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
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class RemoveDevices < ActiveRecord::Migration[5.0]
|
class RemoveDevices < ActiveRecord::Migration[5.0]
|
||||||
def change
|
def up
|
||||||
drop_table :devices if table_exists?(:devices)
|
drop_table :devices if table_exists?(:devices)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
raise ActiveRecord::IrreversibleMigration
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue