method
new_column_definition
v8.0.0 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::MySQL::ColumnMethods::TableDefinition
new_column_definition(name, type, **options)public
No documentation available.
# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 66
def new_column_definition(name, type, **options) # :nodoc:
case type
when :virtual
type = options[:type]
when :primary_key
type = :integer
options[:limit] ||= 8
options[:primary_key] = true
when /\Aunsigned_(?<type>.+)\z/
type = $~[:type].to_sym
options[:unsigned] = true
end
super
end