Changeset 4860 for trunk/wp-admin/upgrade-schema.php
- Timestamp:
- 02/02/2007 12:04:35 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upgrade-schema.php
r4832 r4860 1 1 <?php 2 2 // 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 } 3 12 4 13 $wp_queries="CREATE TABLE $wpdb->categories ( … … 14 23 PRIMARY KEY (cat_ID), 15 24 KEY category_nicename (category_nicename) 16 ) ;25 ) $charset_collate; 17 26 CREATE TABLE $wpdb->comments ( 18 27 comment_ID bigint(20) unsigned NOT NULL auto_increment, … … 34 43 KEY comment_approved (comment_approved), 35 44 KEY comment_post_ID (comment_post_ID) 36 ) ;45 ) $charset_collate; 37 46 CREATE TABLE $wpdb->link2cat ( 38 47 rel_id bigint(20) NOT NULL auto_increment, … … 41 50 PRIMARY KEY (rel_id), 42 51 KEY link_id (link_id,category_id) 43 ) ;52 ) $charset_collate; 44 53 CREATE TABLE $wpdb->links ( 45 54 link_id bigint(20) NOT NULL auto_increment, … … 60 69 KEY link_category (link_category), 61 70 KEY link_visible (link_visible) 62 ) ;71 ) $charset_collate; 63 72 CREATE TABLE $wpdb->options ( 64 73 option_id bigint(20) NOT NULL auto_increment, … … 75 84 PRIMARY KEY (option_id,blog_id,option_name), 76 85 KEY option_name (option_name) 77 ) ;86 ) $charset_collate; 78 87 CREATE TABLE $wpdb->post2cat ( 79 88 rel_id bigint(20) NOT NULL auto_increment, … … 82 91 PRIMARY KEY (rel_id), 83 92 KEY post_id (post_id,category_id) 84 ) ;93 ) $charset_collate; 85 94 CREATE TABLE $wpdb->postmeta ( 86 95 meta_id bigint(20) NOT NULL auto_increment, … … 91 100 KEY post_id (post_id), 92 101 KEY meta_key (meta_key) 93 ) ;102 ) $charset_collate; 94 103 CREATE TABLE $wpdb->posts ( 95 104 ID bigint(20) unsigned NOT NULL auto_increment, … … 120 129 KEY post_name (post_name), 121 130 KEY type_status_date (post_type,post_status,post_date,ID) 122 ) ;131 ) $charset_collate; 123 132 CREATE TABLE $wpdb->users ( 124 133 ID bigint(20) unsigned NOT NULL auto_increment, … … 134 143 PRIMARY KEY (ID), 135 144 KEY user_login_key (user_login) 136 ) ;145 ) $charset_collate; 137 146 CREATE TABLE $wpdb->usermeta ( 138 147 umeta_id bigint(20) NOT NULL auto_increment, … … 143 152 KEY user_id (user_id), 144 153 KEY meta_key (meta_key) 145 ) ;";154 ) $charset_collate;"; 146 155 147 156 function populate_options() {
Note: See TracChangeset
for help on using the changeset viewer.