Make WordPress Core


Ignore:
Timestamp:
05/22/2007 05:12:38 AM (19 years ago)
Author:
ryan
Message:

Very rough initial commit of taxonomy for everyone's hacking pleasure. There be dragons. see #4189

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upgrade-schema.php

    r5303 r5510  
    1111}
    1212
    13 $wp_queries="CREATE TABLE $wpdb->categories (
    14   cat_ID bigint(20) NOT NULL auto_increment,
    15   cat_name varchar(55) NOT NULL default '',
    16   category_nicename varchar(200) NOT NULL default '',
    17   category_description longtext NOT NULL,
    18   category_parent bigint(20) NOT NULL default '0',
    19   category_count bigint(20) NOT NULL default '0',
    20   link_count bigint(20) NOT NULL default '0',
    21   tag_count bigint(20) NOT NULL default '0',
    22   posts_private tinyint(1) NOT NULL default '0',
    23   links_private tinyint(1) NOT NULL default '0',
    24   type tinyint NOT NULL default '1',
    25   PRIMARY KEY  (cat_ID),
    26   KEY category_nicename (category_nicename)
     13$wp_queries="CREATE TABLE $wpdb->terms (
     14 term_id bigint(20) NOT NULL auto_increment,
     15 name varchar(55) NOT NULL default '',
     16 slug varchar(200) NOT NULL default '',
     17 term_group bigint(10) NOT NULL default 0,
     18 PRIMARY KEY  (term_id),
     19 UNIQUE KEY slug (slug)
     20) $charset_collate;
     21CREATE TABLE $wpdb->term_taxonomy (
     22 term_taxonomy_id bigint(20) NOT NULL auto_increment,
     23 term_id bigint(20) NOT NULL default 0,
     24 taxonomy varchar(32) NOT NULL default '',
     25 description longtext NOT NULL,
     26 parent bigint(20) NOT NULL default 0,
     27 count bigint(20) NOT NULL default 0,
     28 PRIMARY KEY (term_taxonomy_id),
     29 UNIQUE KEY (term_id, taxonomy)
     30) $charset_collate;
     31CREATE TABLE $wpdb->term_relationships (
     32 object_id bigint(20) NOT NULL default 0,
     33 term_taxonomy_id bigint(20) NOT NULL default 0,
     34 PRIMARY KEY  (object_id),
     35 KEY (term_taxonomy_id)
    2736) $charset_collate;
    2837CREATE TABLE $wpdb->comments (
     
    4655  KEY comment_post_ID (comment_post_ID)
    4756) $charset_collate;
    48 CREATE TABLE $wpdb->link2cat (
    49   rel_id bigint(20) NOT NULL auto_increment,
    50   link_id bigint(20) NOT NULL default '0',
    51   category_id bigint(20) NOT NULL default '0',
    52   PRIMARY KEY  (rel_id),
    53   KEY link_id (link_id,category_id)
    54 ) $charset_collate;
    5557CREATE TABLE $wpdb->links (
    5658  link_id bigint(20) NOT NULL auto_increment,
     
    8688  PRIMARY KEY  (option_id,blog_id,option_name),
    8789  KEY option_name (option_name)
    88 ) $charset_collate;
    89 CREATE TABLE $wpdb->post2cat (
    90   rel_id bigint(20) NOT NULL auto_increment,
    91   post_id bigint(20) NOT NULL default '0',
    92   category_id bigint(20) NOT NULL default '0',
    93   rel_type varchar(64) NOT NULL default 'category',
    94   PRIMARY KEY  (rel_id),
    95   KEY post_id (post_id,category_id)
    9690) $charset_collate;
    9791CREATE TABLE $wpdb->postmeta (
Note: See TracChangeset for help on using the changeset viewer.