Difference between revisions of "Database Table: reluser2"

From Dreamwidth Notes
Jump to: navigation, search
m
Line 1: Line 1:
Stores information about community memberships. This is in the clustered database; [[reluser]] stores related information in the global database.
+
User-space (clustered) relationships table. Only used for 'hide this comm from my profile page'. This is in the clustered database; [[Database Table: reluser|reluser]] stores related information in the global database.
  
[[Category: Database Tables|reluser2]]
+
 
 +
[[Category: Database Table|reluser2]]
 
=Definition=
 
=Definition=
 
<source lang="sql">
 
<source lang="sql">
Line 14: Line 15:
  
 
=Relationships=
 
=Relationships=
*Foreign key  userid to [[user]].userid
+
*Foreign key  userid to [[Database Table: user|user]].userid
*Foreign key targetid to [[user]].userid
+
*Foreign key targetid to [[Database Table: user|user]].userid
  
Possible values of ''type'' are defined in get_reluser_id, in [[ljrelation.pl]]. Note that this does not take the same values as the char(1) ''type'' field in [[reluser]].
+
Possible values of ''type'' are defined in get_reluser_id, in [[ljrelation.pl]]. Note that this does not take the same values as the char(1) ''type'' field in [[Database Table: reluser|reluser]].
  
 
=Location=
 
=Location=
 
Clustered db
 
Clustered db

Revision as of 00:45, 21 March 2009

User-space (clustered) relationships table. Only used for 'hide this comm from my profile page'. This is in the clustered database; reluser stores related information in the global database.

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)
)

Relationships

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

Possible values of type are defined in get_reluser_id, in ljrelation.pl. Note that this does not take the same values as the char(1) type field in reluser.

Location

Clustered db