Codex tools: Log in
Preliminary terms tables that is scheduled for inclusion in 2.3.
CREATE TABLE $wpdb->terms ( term_id bigint(20) NOT NULL auto_increment, term_name varchar(55) NOT NULL default '', term_slug varchar(200) NOT NULL default '', term_group bigint(10) NOT NULL default 0 PRIMARY KEY (term_ID), UNIQUE KEY term_slug (term_slug) ); CREATE TABLE $wpdb->term_taxonomy ( term_taxonomy_id bigint(20) NOT NULL auto_increment, term_id bigint(20) NOT NULL default 0, taxonomy varchar(20) NOT NULL default 0, term_description longtext NOT NULL, parent bigint(20) NOT NULL default 0, count bigint(20) NOT NULL default 0, PRIMARY KEY (term_taxonomy_id), KEY (term_idtaxonomy) ); CREATE TABLE $wpdb->term_relationships ( object_id bigint(20) NOT NULL default 0, term_taxonomy_id bigint(20) NOT NULL default 0, PRIMARY KEY (object_ID), KEY (term_taxonomy_id) );
| Field | Type | Null | Key | Default | Extra |
|---|---|---|---|---|---|
| term_id | bigint(20) | PRI | NULL | auto_increment | |
| term_name | varchar(55) | ||||
| term_slug | varchar(200) | UNQ | |||
| term_group | bigint(20) | 0 | |||
| category_count | bigint(20) | 0 |
| Field | Type | Null | Key | Default | Extra |
|---|---|---|---|---|---|
| term_taxonomy_id | bigint(20) | PRI | NULL | auto_increment | |
| term_id | bigint(20) | IND | NULL | ||
| taxonomy | varchar(20) | ||||
| term_description | longtext | ||||
| parent | bigint(20) | 0 | |||
| count | bigint(20) | 0 |
| Field | Type | Null | Key | Default | Extra |
|---|---|---|---|---|---|
| object_id | bigint(20) | PRI | NULL | ||
| term_taxonomy_id | bigint(20) | IND | NULL |