db: fix migration to drop ai_tags.tag_id index concurrently.
Fix deadlock in production when trying to drop this index.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
class AddTagIdAndScoreIndexToAITags < ActiveRecord::Migration[7.0]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :ai_tags, [:tag_id, :score], if_not_exists: true
|
||||
remove_index :ai_tags, :tag_id
|
||||
remove_index :ai_tags, :tag_id, algorithm: :concurrently, if_exists: true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user