diff --git a/src/bp-activity/bp-activity-functions.php b/src/bp-activity/bp-activity-functions.php index c907ed3059..a43589f8e2 100644 --- a/src/bp-activity/bp-activity-functions.php +++ b/src/bp-activity/bp-activity-functions.php @@ -6127,10 +6127,6 @@ function bb_activity_migration( $raw_db_version, $current_db ) { } } } - - if ( bp_is_active( 'activity' ) && class_exists( 'BB_Schedule_Posts' ) ) { - BB_Schedule_Posts::bb_create_activity_schedule_cron_event(); - } } /** diff --git a/src/bp-core/bp-core-update.php b/src/bp-core/bp-core-update.php index 6a73b24f16..b6f4530987 100644 --- a/src/bp-core/bp-core-update.php +++ b/src/bp-core/bp-core-update.php @@ -487,10 +487,6 @@ function bp_version_updater() { bb_update_to_2_5_80(); } - if ( $raw_db_version < 21101 ) { - bb_update_to_2_6_00(); - } - if ( $raw_db_version !== $current_db ) { // @todo - Write only data manipulate migration here. ( This is not for DB structure change ). @@ -3498,53 +3494,3 @@ function bb_update_to_2_5_80() { bp_update_option( 'bb_ajax_request_page_load', 2 ); bp_update_option( 'bb_load_activity_per_request', 10 ); } - -/** - * Create a new column in database tables. - * - * @since BuddyBoss [BBVERSION] - * - * @return void - */ -function bb_update_to_2_6_00() { - global $wpdb; - $bp_prefix = bp_core_get_table_prefix(); - - // Check if the 'bp_activity' table exists. - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $table_exists = $wpdb->get_var( "SHOW TABLES LIKE '{$bp_prefix}bp_activity'" ); - if ( $table_exists ) { - - // Add 'status' column in 'bp_activity' table. - $row = $wpdb->get_results( "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema= '" . DB_NAME . "' AND table_name = '{$bp_prefix}bp_activity' AND column_name = 'status'" ); //phpcs:ignore - if ( empty( $row ) ) { - $wpdb->query( "ALTER TABLE {$bp_prefix}bp_activity ADD `status` varchar( 20 ) NOT NULL DEFAULT 'published' AFTER `privacy`" ); //phpcs:ignore - } - } - - // Check if the 'bp_media' table exists. - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $table_exists = $wpdb->get_var( "SHOW TABLES LIKE '{$bp_prefix}bp_media'" ); - if ( $table_exists ) { - - // Add 'status' column in 'bp_media' table. - $row = $wpdb->get_results( "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema= '" . DB_NAME . "' AND table_name = '{$bp_prefix}bp_media' AND column_name = 'status'" ); //phpcs:ignore - - if ( empty( $row ) ) { - $wpdb->query( "ALTER TABLE {$bp_prefix}bp_media ADD `status` varchar( 20 ) NOT NULL DEFAULT 'published' AFTER `menu_order`" ); //phpcs:ignore - } - } - - // Check if the 'bp_document' table exists. - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared - $table_exists = $wpdb->get_var( "SHOW TABLES LIKE '{$bp_prefix}bp_document'" ); - if ( $table_exists ) { - - // Add 'status' column in 'bp_document' table. - $row = $wpdb->get_results( "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema= '" . DB_NAME . "' AND table_name = '{$bp_prefix}bp_document' AND column_name = 'status'" ); //phpcs:ignore - - if ( empty( $row ) ) { - $wpdb->query( "ALTER TABLE {$bp_prefix}bp_document ADD `status` varchar( 20 ) NOT NULL DEFAULT 'published' AFTER `menu_order`" ); //phpcs:ignore - } - } -}