Fix Rails/BulkChangeTable cop (#26890)

This commit is contained in:
Matt Jankowski 2023-11-06 11:15:48 -05:00 committed by GitHub
parent 0c4e7c06dc
commit c501d626e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 208 additions and 107 deletions

View file

@ -2,8 +2,12 @@
class AddTrendableToAccounts < ActiveRecord::Migration[6.1]
def change
add_column :accounts, :trendable, :boolean
add_column :accounts, :reviewed_at, :datetime
add_column :accounts, :requested_review_at, :datetime
safety_assured do
change_table(:accounts, bulk: true) do |t|
t.column :trendable, :boolean
t.column :reviewed_at, :datetime
t.column :requested_review_at, :datetime
end
end
end
end