Use if_exists: true when removing duplicate indexes (#35309)
This commit is contained in:
parent
69e14246b8
commit
f96743fcfb
1 changed files with 6 additions and 4 deletions
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
class RemoveDuplicateIndexes < ActiveRecord::Migration[7.1]
|
class RemoveDuplicateIndexes < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
remove_index :account_aliases, :account_id
|
with_options if_exists: true do
|
||||||
remove_index :account_relationship_severance_events, :account_id
|
remove_index :account_aliases, :account_id
|
||||||
remove_index :custom_filter_statuses, :status_id
|
remove_index :account_relationship_severance_events, :account_id
|
||||||
remove_index :webauthn_credentials, :user_id
|
remove_index :custom_filter_statuses, :status_id
|
||||||
|
remove_index :webauthn_credentials, :user_id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue