This function has been deprecated. BuddyPress 1.7.0 instead.
bp_update_db_stuff()
This function was originally used to update pre-1.1 schemas, but that was before we had a legitimate update process.
Description
Source
File: bp-core/deprecated/buddypress/1.7.php
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | function bp_update_db_stuff() { global $wpdb ; $bp = buddypress(); $bp_prefix = bp_core_get_table_prefix(); // Rename the old user activity cached table if needed. if ( $wpdb ->get_var( "SHOW TABLES LIKE '%{$bp_prefix}bp_activity_user_activity_cached%'" ) ) { $wpdb ->query( "RENAME TABLE {$bp_prefix}bp_activity_user_activity_cached TO {$bp->activity->table_name}" ); } // Rename fields from pre BP 1.2 if ( $wpdb ->get_var( "SHOW TABLES LIKE '%{$bp->activity->table_name}%'" ) ) { if ( $wpdb ->get_var( "SHOW COLUMNS FROM {$bp->activity->table_name} LIKE 'component_action'" ) ) { $wpdb ->query( "ALTER TABLE {$bp->activity->table_name} CHANGE component_action type varchar(75) NOT NULL" ); } if ( $wpdb ->get_var( "SHOW COLUMNS FROM {$bp->activity->table_name} LIKE 'component_name'" ) ) { $wpdb ->query( "ALTER TABLE {$bp->activity->table_name} CHANGE component_name component varchar(75) NOT NULL" ); } } // On first installation - record all existing blogs in the system. if ( !(int) $bp ->site_options[ 'bp-blogs-first-install' ] ) { bp_blogs_record_existing_blogs(); bp_update_option( 'bp-blogs-first-install' , 1 ); } if ( is_multisite() ) { bp_core_add_illegal_names(); } // Update and remove the message threads table if it exists if ( $wpdb ->get_var( "SHOW TABLES LIKE '%{$bp_prefix}bp_messages_threads%'" ) ) { if ( BP_Messages_Thread::update_tables() ) { $wpdb ->query( "DROP TABLE {$bp_prefix}bp_messages_threads" ); } } } |
Changelog
Version | Description |
---|---|
BuddyPress 1.7.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.