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.
15 lines
339 B
Ruby
15 lines
339 B
Ruby
class RemoveTolk < ActiveRecord::Migration[4.2]
|
|
def up
|
|
remove_index :tolk_translations, column: [:phrase_id, :locale_id]
|
|
remove_index :tolk_locales, column: :name
|
|
|
|
drop_table :tolk_translations
|
|
drop_table :tolk_phrases
|
|
drop_table :tolk_locales
|
|
end
|
|
|
|
def down
|
|
fail ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|