Difference between revisions of "Database Table: reluser"

From Dreamwidth Notes
Jump to: navigation, search
m (Robot: Updating page description status.)
(Robot: Updating: Format, definition)
Line 3: Line 3:
  
 
{{Expand|text=Mark's explanation should go up here at some point.}}
 
{{Expand|text=Mark's explanation should go up here at some point.}}
 
 
 
= Definition =
 
= Definition =
 
 
<source lang="sql">
 
<source lang="sql">
 
CREATE TABLE reluser (
 
CREATE TABLE reluser (
:userid    INT UNSIGNED NOT NULL,
+
    userid    INT UNSIGNED NOT NULL,
:targetid  INT UNSIGNED NOT NULL,
+
    targetid  INT UNSIGNED NOT NULL,
:type      char(1) NOT NULL,
+
    type      char(1) NOT NULL,
:PRIMARY KEY (userid,type,targetid),
+
    PRIMARY KEY (userid,type,targetid),
:KEY (targetid,type)
+
    KEY (targetid,type)
 
)
 
)
 
</source>
 
</source>
 
 
Possible values of the <tt>type</tt> field are:
 
Possible values of the <tt>type</tt> field are:
  

Revision as of 07:03, 28 January 2010

"{{{repo}}}" is not in the list of possible values (dw-free, dw-nonfree) for this property. This is a global table. Global. Stores information about permissions for users to post to journals other than their own, such as community memberships, mod privileges and bans. Most of the edges are stored here, since edges can cross clusters. reluser2 stores related information in the clustered database.

Expand: Mark's explanation should go up here at some point.

Definition

CREATE TABLE reluser (
    userid     INT UNSIGNED NOT NULL,
    targetid   INT UNSIGNED NOT NULL,
    TYPE       CHAR(1) NOT NULL,
    PRIMARY KEY (userid,TYPE,targetid),
    KEY (targetid,TYPE)
)

Possible values of the type field are:

  • 'A' means targetid can administrate userid as a community maintainer
  • 'B' means targetid is banned in userid
  • 'P' means targetid can post to userid
  • 'M' means targetid can moderate the community userid
  • 'N' means targetid is preapproved to post to community userid without moderation
  • 'I' means targetid invited userid to the site

Relationships

Outgoing

  • Foreign key: targetid to user.userid
  • Foreign key: userid to user.userid