Fix Rails/ReversibleMigration cop for drop_table

This commit is contained in:
Matt Jankowski 2024-06-25 11:45:37 -04:00
parent c9ea91f868
commit d1838e13aa

View file

@ -1,7 +1,11 @@
# frozen_string_literal: true
class RemoveDevices < ActiveRecord::Migration[5.0]
def change
def up
drop_table :devices if table_exists?(:devices)
end
def down
raise ActiveRecord::IrreversibleMigration
end
end