bb_upgrade_200

The BuddyPress bb upgrade 200 function.

Description

bb_upgrade_200(); 

Usage

  1. if ( !function_exists( 'bb_upgrade_200' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-admin/includes/functions.bb-upgrade.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bb_upgrade_200(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-forums/bbpress/bb-admin/includes/functions.bb-upgrade.php  
  1. function bb_upgrade_200() { 
  2. if ( ( $dbv = bb_get_option_from_db( 'bb_db_version' ) ) && $dbv >= 845 ) 
  3. return; 
  4.  
  5. global $bbdb; 
  6.  
  7. $bbdb->hide_errors(); 
  8. $bbdb->query( "DROP INDEX tag_id_index ON $bbdb->tagged" ); 
  9. $bbdb->query( "DROP INDEX user_id ON $bbdb->topicmeta" ); 
  10. $bbdb->query( "DROP INDEX forum_id ON $bbdb->topics" ); 
  11. $bbdb->query( "DROP INDEX topic_time ON $bbdb->topics" ); 
  12. $bbdb->query( "DROP INDEX topic_start_time ON $bbdb->topics" ); 
  13. $bbdb->query( "DROP INDEX tag_id_index ON $bbdb->tagged" ); 
  14. $bbdb->query( "DROP INDEX topic_id ON $bbdb->posts" ); 
  15. $bbdb->query( "DROP INDEX poster_id ON $bbdb->posts" ); 
  16. $bbdb->show_errors(); 
  17.  
  18. bb_update_option( 'bb_db_version', 845 ); 
  19.  
  20. return 'Done removing old indices: ' . __FUNCTION__;