Make WordPress Core

Ticket #787: ticket787patch.diff

File ticket787patch.diff, 1.4 KB (added by ketsugi, 17 years ago)

A quick patch: removes the rel_id columns from link2cat and post2cat, replaces the primary keys with a tuple, and bumps the database version by 1.

  • wp-includes/version.php

     
    33// This holds the version number in a separate file so we can bump it without cluttering the SVN
    44
    55$wp_version = '2.1-alpha2';
    6 $wp_db_version = 3845;
     6$wp_db_version = 3846;
    77
    88?>
     9 No newline at end of file
  • wp-admin/upgrade-schema.php

     
    3535  KEY comment_post_ID (comment_post_ID)
    3636);
    3737CREATE TABLE $wpdb->link2cat (
    38   rel_id bigint(20) NOT NULL auto_increment,
    3938  link_id bigint(20) NOT NULL default '0',
    4039  category_id bigint(20) NOT NULL default '0',
    41   PRIMARY KEY  (rel_id),
    42   KEY link_id (link_id,category_id)
     40  PRIMARY KEY  (link_id,category_id)
    4341);
    4442CREATE TABLE $wpdb->links (
    4543  link_id bigint(20) NOT NULL auto_increment,
     
    7674  KEY option_name (option_name)
    7775);
    7876CREATE TABLE $wpdb->post2cat (
    79   rel_id bigint(20) NOT NULL auto_increment,
    8077  post_id bigint(20) NOT NULL default '0',
    8178  category_id bigint(20) NOT NULL default '0',
    82   PRIMARY KEY  (rel_id),
    83   KEY post_id (post_id,category_id)
     79  PRIMARY KEY  (post_id,category_id)
    8480);
    8581CREATE TABLE $wpdb->postmeta (
    8682  meta_id bigint(20) NOT NULL auto_increment,