instance method
change
Ruby on Rails 4.2.9
Since v2.2.3Signature
change(column_name, type, options = {})
Changes the column’s definition according to the new options. See TableDefinition#column for details of the options you can use.
t.change(:name, :string, limit: 80) t.change(:description, :text)
Parameters
-
column_namereq -
typereq -
optionsopt = {}
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 488
def change(column_name, type, options = {})
@base.change_column(name, column_name, type, options)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb line 488
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::Table