From 64e9f2e65a955db7371698f697b25902b1b00b4f Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 8 Aug 2023 11:41:53 +0200 Subject: [PATCH] Fix `preview_cards_statuses_pkey` not being reindexed concurrently (#26384) --- ...20230803082451_add_unique_index_on_preview_cards_statuses.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/post_migrate/20230803082451_add_unique_index_on_preview_cards_statuses.rb b/db/post_migrate/20230803082451_add_unique_index_on_preview_cards_statuses.rb index 936d7840eb..c35ad80028 100644 --- a/db/post_migrate/20230803082451_add_unique_index_on_preview_cards_statuses.rb +++ b/db/post_migrate/20230803082451_add_unique_index_on_preview_cards_statuses.rb @@ -18,7 +18,7 @@ class AddUniqueIndexOnPreviewCardsStatuses < ActiveRecord::Migration[6.1] def deduplicate_and_reindex! deduplicate_preview_cards! - safety_assured { execute 'REINDEX INDEX preview_cards_statuses_pkey' } + safety_assured { execute 'REINDEX INDEX CONCURRENTLY preview_cards_statuses_pkey' } rescue ActiveRecord::RecordNotUnique retry end