Fix Rails/BulkChangeTable cop (#26890)

This commit is contained in:
Matt Jankowski 2023-11-06 11:15:48 -05:00 committed by GitHub
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

@ -15,7 +15,9 @@ class ChangeRelaysEnabled < ActiveRecord::Migration[5.2]
end
def down
remove_column :relays, :state
add_column :relays, :enabled, :boolean, default: false, null: false
change_table(:relays, bulk: true) do |t|
t.remove :state
t.column :enabled, :boolean, default: false, null: false
end
end
end