Skip to content

Commit

Permalink
Merge pull request #2208 from Automattic/update/search-schema-index
Browse files Browse the repository at this point in the history
Remove index removal
  • Loading branch information
pschoffer committed Jun 14, 2021
2 parents 9de6cd0 + 1fa6202 commit 3fbda9c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions search/includes/classes/queue/class-schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ protected function _prepare_table() {
$table_count = count( $wpdb->get_col( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table_name ) ) );

if ( 1 === $table_count ) {
// Between version 2 and 3, we added the `index_version` column, which is part of the unique index, so need to drop the old index
// (which doesn't happen automatically in dbDelta, sadly)
if ( 3 === self::DB_VERSION ) {
$wpdb->query( "DROP INDEX IF EXISTS `unique_object_and_status` on $table_name" ); // Cannot prepare table name. @codingStandardsIgnoreLine
}

set_transient( self::DB_VERSION_TRANSIENT, self::DB_VERSION, self::DB_VERSION_TRANSIENT_TTL );
} else {
trigger_error( esc_html( "VIP Search Queue index table ($table_name) not found after dbDelta()" ), \E_USER_WARNING );
Expand Down

0 comments on commit 3fbda9c

Please sign in to comment.