Changeset 845
- Timestamp:
- 06/07/07 03:50:25 (1 year ago)
- Files:
-
- trunk/bb-admin/upgrade-functions.php (modified) (2 diffs)
- trunk/bb-admin/upgrade-schema.php (modified) (5 diffs)
- trunk/bb-includes/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/bb-admin/upgrade-functions.php
r792 r845 15 15 $bb_upgrade += bb_upgrade_180(); // Delete users for real 16 16 $bb_upgrade += bb_upgrade_190(); // Move topic_resolved to topicmeta 17 $bb_upgrade += bb_upgrade_200(); // Indices 17 18 require_once( BBPATH . 'bb-admin/upgrade-schema.php'); 18 19 bb_make_db_current(); 19 $bb_upgrade += bb_upgrade_ 200(); // Make forum and topic slugs20 $bb_upgrade += bb_upgrade_1000(); // Make forum and topic slugs 20 21 bb_update_db_version(); 21 22 return $bb_upgrade; … … 335 336 336 337 function bb_upgrade_200() { 338 if ( ( $dbv = bb_get_option_from_db( 'bb_db_version' ) ) && $dbv >= 845 ) 339 return 0; 340 341 global $bbdb; 342 343 $bbdb->hide_errors(); 344 $bbdb->query( "DROP INDEX tag_id_index ON $bbdb->tagged" ); 345 $bbdb->query( "DROP INDEX user_id ON $bbdb->topicmeta" ); 346 $bbdb->query( "DROP INDEX forum_id ON $bbdb->topics" ); 347 $bbdb->query( "DROP INDEX topic_time ON $bbdb->topics" ); 348 $bbdb->query( "DROP INDEX topic_start_time ON $bbdb->topics" ); 349 $bbdb->query( "DROP INDEX tag_id_index ON $bbdb->tagged" ); 350 $bbdb->query( "DROP INDEX topic_id ON $bbdb->posts" ); 351 $bbdb->query( "DROP INDEX poster_id ON $bbdb->posts" ); 352 $bbdb->show_errors(); 353 354 bb_update_option( 'bb_db_version', 845 ); 355 356 echo "Done removing old indices.<br />"; 357 return 1; 358 359 } 360 361 function bb_upgrade_1000() { 337 362 if ( ( $dbv = bb_get_option_from_db( 'bb_db_version' ) ) && $dbv >= 788 ) 338 363 return 0; trunk/bb-admin/upgrade-schema.php
r788 r845 24 24 post_position bigint(20) NOT NULL default '0', 25 25 PRIMARY KEY (post_id), 26 KEY topic_ id (topic_id),27 KEY poster_ id (poster_id),26 KEY topic_time (topic_id,post_time), 27 KEY poster_time (poster_id,post_time), 28 28 KEY post_time (post_time), 29 29 FULLTEXT KEY post_text (post_text) … … 47 47 tag_count bigint(20) NOT NULL default '0', 48 48 PRIMARY KEY (topic_id), 49 KEY forum_id (forum_id), 50 KEY topic_time (topic_time), 51 KEY topic_start_time (topic_start_time) 49 KEY forum_time (forum_id,topic_time), 50 KEY user_start_time (topic_poster,topic_start_time) 52 51 ); 53 52 CREATE TABLE $bbdb->topicmeta ( … … 57 56 meta_value longtext, 58 57 PRIMARY KEY (meta_id), 59 KEY user_id (topic_id),58 KEY topic_id (topic_id), 60 59 KEY meta_key (meta_key) 61 60 ); … … 87 86 raw_tag varchar(50) NOT NULL default '', 88 87 tag_count bigint(20) unsigned NOT NULL default '0', 89 PRIMARY KEY (tag_id) 88 PRIMARY KEY (tag_id), 89 KEY name (tag) 90 90 ); 91 91 CREATE TABLE $bbdb->tagged ( … … 95 95 tagged_on datetime NOT NULL default '0000-00-00 00:00:00', 96 96 PRIMARY KEY (tag_id,user_id,topic_id), 97 KEY tag_id_index (tag_id),98 97 KEY user_id_index (user_id), 99 98 KEY topic_id_index (topic_id) trunk/bb-includes/functions.php
r844 r845 1189 1189 break; 1190 1190 case 'bb_db_version' : 1191 return ' 788'; // Don't filter1191 return '845'; // Don't filter 1192 1192 break; 1193 1193 case 'html_type' :