Difference between revisions of "Database Table: codes"

From Dreamwidth Notes
Jump to: navigation, search
(Created page with 'codes =Definition= <source lang="sql"> CREATE TABLE codes ( type varchar(10) NOT NULL default '', code varchar(7) NOT NULL default '', item var...')
 
(Robot: Updating: Format)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category: Database Table|codes]]
+
{{Database Table|name=codes|table type=global|repo=dw-free}}
=Definition=
+
[[Description::This table stores coded values for a number of lists, including countries, states/provinces, and certain sets of colors. See upgrading/base-data.sql for initial content.]]
 +
= Definition =
 
<source lang="sql">
 
<source lang="sql">
 
CREATE TABLE codes (
 
CREATE TABLE codes (
  type varchar(10) NOT NULL default '',
+
    type varchar(10) NOT NULL default '',
  code varchar(7) NOT NULL default '',
+
    code varchar(7) NOT NULL default '',
  item varchar(80) default NULL,
+
    item varchar(80) default NULL,
  sortorder smallint(6) NOT NULL default '0',
+
    sortorder smallint(6) NOT NULL default '0',
  PRIMARY KEY  (type,code)
+
 
 +
    PRIMARY KEY  (type,code)
 
) PACK_KEYS=1
 
) PACK_KEYS=1
 
</source>
 
</source>
 
+
{{Database Table Footer}}
=Relationships=
+
 
+
=Location=
+
[[Global database]]
+

Latest revision as of 16:01, 22 July 2010

This is a global table. This table stores coded values for a number of lists, including countries, states/provinces, and certain sets of colors. See upgrading/base-data.sql for initial content.

Definition

CREATE TABLE codes (
    TYPE VARCHAR(10) NOT NULL DEFAULT '',
    code VARCHAR(7) NOT NULL DEFAULT '',
    item VARCHAR(80) DEFAULT NULL,
    sortorder SMALLINT(6) NOT NULL DEFAULT '0',
 
    PRIMARY KEY  (TYPE,code)
) PACK_KEYS=1

Relationships