Difference between revisions of "Database Table: userpic2"

From Dreamwidth Notes
Jump to: navigation, search
(Created page with 'userpic =Definition= <source lang="sql"> CREATE TABLE userpic ( picid int(10) unsigned NOT NULL auto_increment, userid int(10) unsigned NOT NULL ...')
 
Line 1: Line 1:
[[Category: Database Table|userpic]]
+
[[Category: Database Table|userpic2]]
 
=Definition=
 
=Definition=
 
<source lang="sql">
 
<source lang="sql">
CREATE TABLE userpic (
+
CREATE TABLE userpic2 (
   picid int(10) unsigned NOT NULL auto_increment,
+
   picid int(10) unsigned NOT NULL,
 
   userid int(10) unsigned NOT NULL default '0',
 
   userid int(10) unsigned NOT NULL default '0',
   contenttype char(25) default NULL,
+
   fmt char(1) default NULL,
 
   width smallint(6) NOT NULL default '0',
 
   width smallint(6) NOT NULL default '0',
 
   height smallint(6) NOT NULL default '0',
 
   height smallint(6) NOT NULL default '0',
Line 11: Line 11:
 
   picdate datetime default NULL,
 
   picdate datetime default NULL,
 
   md5base64 char(22) NOT NULL default '',
 
   md5base64 char(22) NOT NULL default '',
   PRIMARY KEY  (picid),
+
   comment varchar(255) BINARY NOT NULL default '',
   KEY (userid),
+
   flags tinyint(1) unsigned NOT NULL default 0,
   KEY (state)
+
   location enum('blob','disk','mogile') default NULL,
 +
  PRIMARY KEY (userid, picid)
 
)
 
)
 
</source>
 
</source>
Line 20: Line 21:
  
 
=Location=
 
=Location=
[[Global database]]
+
[[Clustered database]]

Revision as of 18:22, 22 March 2009

Definition

CREATE TABLE userpic2 (
  picid INT(10) UNSIGNED NOT NULL,
  userid INT(10) UNSIGNED NOT NULL DEFAULT '0',
  fmt CHAR(1) DEFAULT NULL,
  width SMALLINT(6) NOT NULL DEFAULT '0',
  height SMALLINT(6) NOT NULL DEFAULT '0',
  state CHAR(1) NOT NULL DEFAULT 'N',
  picdate datetime DEFAULT NULL,
  md5base64 CHAR(22) NOT NULL DEFAULT '',
  comment VARCHAR(255) BINARY NOT NULL DEFAULT '',
  flags tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
  location enum('blob','disk','mogile') DEFAULT NULL,
  PRIMARY KEY  (userid, picid)
)

Relationships

Location

Clustered database