method
inverse_of
v4.0.2 -
Show latest stable
- Class:
ActiveRecord::Migration::CommandRecorder
inverse_of(command, args, &block)public
Returns the inverse of the given command. For example:
recorder.inverse_of(:rename_table, [:old, :new]) # => [:rename_table, [:new, :old]]
This method will raise an IrreversibleMigration exception if it cannot invert the command.