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,10 +4,10 @@ class AddPublicIndexToStatuses < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def up
add_index :statuses, [:id, :account_id], name: :index_statuses_public_20200119, algorithm: :concurrently, order: { id: :desc }, where: 'deleted_at IS NULL AND visibility = 0 AND reblog_of_id IS NULL AND ((NOT reply) OR (in_reply_to_account_id = account_id))'
add_index :statuses, [:id, :account_id], name: :index_statuses_public_20200119, algorithm: :concurrently, order: { id: :desc }, where: 'deleted_at IS NULL AND visibility = 0 AND reblog_of_id IS NULL AND ((NOT reply) OR (in_reply_to_account_id = account_id))' # rubocop:disable Naming/VariableNumber
end
def down
remove_index :statuses, name: :index_statuses_public_20200119
remove_index :statuses, name: :index_statuses_public_20200119 # rubocop:disable Naming/VariableNumber
end
end