Files
nairobi/db/migrate/20170102080432_adjust_budget_fields.rb
Javi Martín 5b7a969964 Fix Rails/ReversibleMigration rule offenses
We forgot to do so in commit fc757428e, when we upgraded rubocop-rails.
In this upgrade, this rule was changed to include the `change_column`
method.

Just like we did in commit df959b74f, I'm raising an
`ActiveRecord::IrreversibleMigration` exception in migrations done
before version 1.0.0, since making all of them reversible would be too
much work for little benefit.
2022-08-25 21:36:31 +02:00

10 lines
215 B
Ruby

class AdjustBudgetFields < ActiveRecord::Migration[4.2]
def up
change_column :budgets, :phase, :string, limit: 40, default: "accepting"
end
def down
fail ActiveRecord::IrreversibleMigration
end
end