WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r5289 r4574  
    11<?php
    22// Here we keep the DB structure and option values
    3 
    4 $charset_collate = '';
    5 
    6 if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {
    7     if ( ! empty($wpdb->charset) )
    8         $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
    9     if ( ! empty($wpdb->collate) )
    10         $charset_collate .= " COLLATE $wpdb->collate";
    11 }
    123
    134$wp_queries="CREATE TABLE $wpdb->categories (
     
    2314  PRIMARY KEY  (cat_ID),
    2415  KEY category_nicename (category_nicename)
    25 ) $charset_collate;
     16);
    2617CREATE TABLE $wpdb->comments (
    2718  comment_ID bigint(20) unsigned NOT NULL auto_increment,
     
    4334  KEY comment_approved (comment_approved),
    4435  KEY comment_post_ID (comment_post_ID)
    45 ) $charset_collate;
     36);
    4637CREATE TABLE $wpdb->link2cat (
    4738  rel_id bigint(20) NOT NULL auto_increment,
     
    5041  PRIMARY KEY  (rel_id),
    5142  KEY link_id (link_id,category_id)
    52 ) $charset_collate;
     43);
    5344CREATE TABLE $wpdb->links (
    5445  link_id bigint(20) NOT NULL auto_increment,
     
    6960  KEY link_category (link_category),
    7061  KEY link_visible (link_visible)
    71 ) $charset_collate;
     62);
    7263CREATE TABLE $wpdb->options (
    7364  option_id bigint(20) NOT NULL auto_increment,
     
    8475  PRIMARY KEY  (option_id,blog_id,option_name),
    8576  KEY option_name (option_name)
    86 ) $charset_collate;
     77);
    8778CREATE TABLE $wpdb->post2cat (
    8879  rel_id bigint(20) NOT NULL auto_increment,
     
    9182  PRIMARY KEY  (rel_id),
    9283  KEY post_id (post_id,category_id)
    93 ) $charset_collate;
     84);
    9485CREATE TABLE $wpdb->postmeta (
    9586  meta_id bigint(20) NOT NULL auto_increment,
     
    10091  KEY post_id (post_id),
    10192  KEY meta_key (meta_key)
    102 ) $charset_collate;
     93);
    10394CREATE TABLE $wpdb->posts (
    10495  ID bigint(20) unsigned NOT NULL auto_increment,
     
    129120  KEY post_name (post_name),
    130121  KEY type_status_date (post_type,post_status,post_date,ID)
    131 ) $charset_collate;
     122);
    132123CREATE TABLE $wpdb->users (
    133124  ID bigint(20) unsigned NOT NULL auto_increment,
     
    143134  PRIMARY KEY  (ID),
    144135  KEY user_login_key (user_login)
    145 ) $charset_collate;
     136);
    146137CREATE TABLE $wpdb->usermeta (
    147138  umeta_id bigint(20) NOT NULL auto_increment,
     
    152143  KEY user_id (user_id),
    153144  KEY meta_key (meta_key)
    154 ) $charset_collate;";
     145);";
    155146
    156147function populate_options() {
Note: See TracChangeset for help on using the changeset viewer.