Changeset 9716
- Timestamp:
- 04/07/2015 01:28:21 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-schema.php
r9695 r9716 38 38 */ 39 39 function bp_core_install( $active_components = false ) { 40 41 bp_pre_schema_upgrade(); 40 42 41 43 // If no components passed, get all the active components from the main site -
trunk/src/bp-core/bp-core-update.php
r9615 r9716 258 258 // Bump the version 259 259 bp_version_bump(); 260 } 261 262 /** 263 * Perform database operations that must take place before the general schema upgrades. 264 * 265 * `dbDelta()` cannot handle certain operations - like changing indexes - so we do it here instead. 266 * 267 * @since BuddyPress (2.3.0) 268 */ 269 function bp_pre_schema_upgrade() { 270 global $wpdb; 271 272 $raw_db_version = (int) bp_get_db_version_raw(); 273 $bp_prefix = bp_core_get_table_prefix(); 274 275 // 2.3.0: Change index lengths to account for utf8mb4. 276 if ( $raw_db_version < 9695 ) { 277 // table_name => columns. 278 $tables = array( 279 $bp_prefix . 'bp_activity_meta' => array( 'meta_key' ), 280 $bp_prefix . 'bp_groups_groupmeta' => array( 'meta_key' ), 281 $bp_prefix . 'bp_messages_meta' => array( 'meta_key' ), 282 $bp_prefix . 'bp_notifications_meta' => array( 'meta_key' ), 283 $bp_prefix . 'bp_user_blogs_blogmeta' => array( 'meta_key' ), 284 $bp_prefix . 'bp_xprofile_meta' => array( 'meta_key' ), 285 ); 286 287 foreach ( $tables as $table_name => $indexes ) { 288 foreach ( $indexes as $index ) { 289 $wpdb->query( "ALTER TABLE $table_name DROP INDEX $index" ); 290 } 291 } 292 } 260 293 } 261 294 -
trunk/src/bp-loader.php
r9683 r9716 306 306 307 307 $this->version = '2.3-alpha'; 308 $this->db_version = 96 15;308 $this->db_version = 9695; 309 309 310 310 /** Loading ***********************************************************/
Note: See TracChangeset
for help on using the changeset viewer.