Difference between revisions of "Database Table: usermsg"

From Dreamwidth Notes
Jump to: navigation, search
m (Robot: Converting database table to use database table header template.)
(Robot: Updating: Format)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Database Table|name=usermsg|table type=clustered}}
+
{{Database Table|name=usermsg|table type=clustered|need desc=1|repo=dw-free}}
 
= Definition =
 
= Definition =
 
 
<source lang="sql">
 
<source lang="sql">
 
CREATE TABLE usermsg (
 
CREATE TABLE usermsg (
  journalid    INT UNSIGNED NOT NULL,
+
    journalid    INT UNSIGNED NOT NULL,
  msgid        INT UNSIGNED NOT NULL,
+
    msgid        INT UNSIGNED NOT NULL,
  type        ENUM('in','out') NOT NULL,
+
    type        ENUM('in','out') NOT NULL,
  parent_msgid INT UNSIGNED,
+
    parent_msgid INT UNSIGNED,
  otherid      INT UNSIGNED NOT NULL,
+
    otherid      INT UNSIGNED NOT NULL,
  timesent    INT UNSIGNED,
+
    timesent    INT UNSIGNED,
  state        CHAR(1) default 'A',
+
    state        CHAR(1) default 'A',
  PRIMARY KEY  (journalid,msgid),
+
 
  INDEX (journalid,type,otherid),
+
    PRIMARY KEY  (journalid,msgid),
  INDEX (journalid,timesent)
+
    INDEX (journalid,type,otherid),
 +
    INDEX (journalid,timesent)
 
)
 
)
 
</source>
 
</source>
 
 
{{Database Table Footer}}
 
{{Database Table Footer}}

Latest revision as of 16:01, 22 July 2010

This is a clustered table.

Definition

CREATE TABLE usermsg (
    journalid    INT UNSIGNED NOT NULL,
    msgid        INT UNSIGNED NOT NULL,
    TYPE         ENUM('in','out') NOT NULL,
    parent_msgid INT UNSIGNED,
    otherid      INT UNSIGNED NOT NULL,
    timesent     INT UNSIGNED,
    state        CHAR(1) DEFAULT 'A',
 
    PRIMARY KEY  (journalid,msgid),
    INDEX (journalid,TYPE,otherid),
    INDEX (journalid,timesent)
)

Relationships