bb_upgrade_220

The BuddyPress bb upgrade 220 function.

Description

bb_upgrade_220(); 

Usage

  1. if ( !function_exists( 'bb_upgrade_220' ) ) { 
  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_220(); 
  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_220() { 
  2. if ( ( $dbv = bb_get_option_from_db( 'bb_db_version' ) ) && $dbv >= 1051 ) 
  3. return; 
  4.  
  5. global $bbdb; 
  6.  
  7. $bbdb->query( "ALTER TABLE $bbdb->tagged DROP PRIMARY KEY" ); 
  8. $bbdb->query( "ALTER TABLE $bbdb->tagged ADD tagged_id bigint(20) unsigned NOT NULL auto_increment PRIMARY KEY FIRST" ); 
  9.  
  10. return "Done removing key from $bbdb->tagged: " . __FUNCTION__;