Method: ActiveRecord::ConnectionAdapters::MySQL::TableDefinition#new_column_definition
- Defined in:
- activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb
#new_column_definition(name, type, **options) ⇒ Object
:nodoc:
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 66 def new_column_definition(name, type, **) # :nodoc: case type when :virtual type = [:type] when :primary_key type = :integer [:limit] ||= 8 [:primary_key] = true when /\Aunsigned_(?<type>.+)\z/ type = $~[:type].to_sym [:unsigned] = true end super end |