1
0

Fix preview_cards_statuses_pkey not being reindexed concurrently (#26384)

This commit is contained in:
Claire 2023-08-08 11:41:53 +02:00 committed by GitHub
parent 0e2a4d3897
commit 4773d7b9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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