Fix `preview_cards_statuses_pkey` not being reindexed concurrently (#26384)
parent
0e2a4d3897
commit
4773d7b9aa
|
@ -18,7 +18,7 @@ class AddUniqueIndexOnPreviewCardsStatuses < ActiveRecord::Migration[6.1]
|
||||||
def deduplicate_and_reindex!
|
def deduplicate_and_reindex!
|
||||||
deduplicate_preview_cards!
|
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
|
rescue ActiveRecord::RecordNotUnique
|
||||||
retry
|
retry
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue