instance method
invert_change_column_default
Ruby on Rails edge
Since v5.0.7.2 Private — implementation detail, not part of the public APISignature
invert_change_column_default(args, kwargs)
No documentation comment.
Parameters
-
argsreq -
kwargsreq
Source
# File activerecord/lib/active_record/migration/command_recorder.rb, line 269
def invert_change_column_default(args, kwargs)
unless kwargs.has_key?(:from) && kwargs.has_key?(:to)
raise ActiveRecord::IrreversibleMigration, "change_column_default is only reversible if given a :from and :to option."
end
[:change_column_default, args, { from: kwargs[:to], to: kwargs[:from] }]
end
Defined in activerecord/lib/active_record/migration/command_recorder.rb line 269
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Migration::CommandRecorder