mirror of https://github.com/mastodon/mastodon.git
Fix `Rails/ReversibleMigration` cop for `drop_table`
parent
845fe1c693
commit
06581e8022
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue