Fix Rails/ReversibleMigrationMethodDefinition
cop (#30794)
This commit is contained in:
parent
2cab1c7b09
commit
4651c0cb39
5 changed files with 10 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RailsSettingsMigration < ActiveRecord::Migration[5.0]
|
||||
def self.up
|
||||
def up
|
||||
create_table :settings do |t|
|
||||
t.string :var, null: false
|
||||
t.text :value
|
||||
|
@ -11,7 +11,7 @@ class RailsSettingsMigration < ActiveRecord::Migration[5.0]
|
|||
add_index :settings, [:target_type, :target_id, :var], unique: true
|
||||
end
|
||||
|
||||
def self.down
|
||||
def down
|
||||
drop_table :settings
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue