Difference between revisions of "Database Table: acctcode"

From Dreamwidth Notes
Jump to: navigation, search
(Undo revision 10958 by Exor674Bot (talk))
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#set:name=acctcode|clustered=false}}
+
{{Database Table|name=acctcode|table type=global|repo=dw-free}}
{{#set_internal:Key relationship
+
[[Description::This table stores data on valid invite codes and who has used them.]] The [[Database Table:acctinvite|acctinvite]] table stores the data on why they were made.
|To table=user
+
|From field=userid
+
|To field=userid
+
}}
+
 
+
 
= Definition =
 
= Definition =
 +
<source lang="sql">
 +
CREATE TABLE acctcode (
 +
    acid    INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +
    userid  INT UNSIGNED NOT NULL,
 +
    rcptid  INT UNSIGNED NOT NULL DEFAULT 0,
 +
    auth    CHAR(13) NOT NULL,
 +
    timegenerate INT UNSIGNED NOT NULL,
 +
    timesent INT UNSIGNED,
 +
    email  VARCHAR(255),
 +
    reason  VARCHAR(255),
  
<source lang="sql">
+
    INDEX (userid),
CREATE TABLE acctcode
+
    INDEX (rcptid)
(
+
  acid    INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
+
  userid  INT UNSIGNED NOT NULL,
+
  rcptid  INT UNSIGNED NOT NULL DEFAULT 0,
+
  auth    CHAR(5) NOT NULL,
+
  INDEX (userid),
+
  INDEX (rcptid)
+
 
)
 
)
 
</source>
 
</source>
 
 
{{Database Table Footer}}
 
{{Database Table Footer}}

Latest revision as of 23:07, 28 November 2012

This is a global table. This table stores data on valid invite codes and who has used them. The acctinvite table stores the data on why they were made.

Definition

CREATE TABLE acctcode (
    acid    INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    userid  INT UNSIGNED NOT NULL,
    rcptid  INT UNSIGNED NOT NULL DEFAULT 0,
    auth    CHAR(13) NOT NULL,
    timegenerate INT UNSIGNED NOT NULL,
    timesent INT UNSIGNED,
    email   VARCHAR(255),
    reason  VARCHAR(255),
 
    INDEX (userid),
    INDEX (rcptid)
)

Relationships

Outgoing

  • Foreign key: userid to user.userid