0
0
Fork 0

Disable Naming/VariableNumber cop in old migrations (#33274)

This commit is contained in:
Matt Jankowski 2024-12-12 03:15:38 -05:00 committed by GitHub
parent 6445facb8c
commit d56aa9031a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 10 additions and 13 deletions

View file

@ -4,12 +4,12 @@ class UpdateStatusesIndex < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def up
safety_assured { add_index :statuses, [:account_id, :id, :visibility, :updated_at], where: 'deleted_at IS NULL', order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20190820 }
remove_index :statuses, name: :index_statuses_20180106
safety_assured { add_index :statuses, [:account_id, :id, :visibility, :updated_at], where: 'deleted_at IS NULL', order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20190820 } # rubocop:disable Naming/VariableNumber
remove_index :statuses, name: :index_statuses_20180106 # rubocop:disable Naming/VariableNumber
end
def down
safety_assured { add_index :statuses, [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106 }
remove_index :statuses, name: :index_statuses_20190820
safety_assured { add_index :statuses, [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106 } # rubocop:disable Naming/VariableNumber
remove_index :statuses, name: :index_statuses_20190820 # rubocop:disable Naming/VariableNumber
end
end