While I don't use this feature, there are developers who do. It's useful when running migrations and changing branches. I'm raising an `ActiveRecord::IrreversibleMigration` exception in every `drop_table` migration because these migrations were all done before version 1.0.0, and so making all of them reversible would be too much work for little benefit.
10 lines
332 B
Ruby
10 lines
332 B
Ruby
class ReplaceGeozonesByHeadingsInBudgets < ActiveRecord::Migration[4.2]
|
|
def change
|
|
remove_column :budget_investments, :geozone_id, :integer
|
|
remove_column :budget_ballots, :geozone_id, :integer
|
|
|
|
add_reference :budget_investments, :heading, index: true
|
|
add_reference :budget_ballots, :heading, index: true
|
|
end
|
|
end
|