I want to trigger another migration similarly to generation. Basically, if you have a table creation, then at some point in the future you will no longer use the table, and you want them to migration caused upand downexactly opposite to those established for the initial migration. If possible, I would create a generator similar to
rails g reverse_migration CreateModel
and then the result will look like
class ReverseCreateModel < ActiveRecord::Migration
def up
end
def down
end
end
I don’t need any way to get around the path and, rather, explicitly duplicating the code and retaining the ability for pure migration and role.
Any help would be greatly appreciated!
source
share