instance method
change_column
Ruby on Rails 8.0.4
Since v2.2.3Signature
change_column(table_name, 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.
change_column(:suppliers, :name, :string, limit: 80) change_column(:accounts, :description, :text)
Parameters
-
table_namereq -
column_namereq -
typereq -
optionskeyrest
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 714
def change_column(table_name, column_name, type, **options)
raise NotImplementedError, "change_column is not implemented"
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb line 714
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::SchemaStatements