Class: ActiveRecord::ConnectionAdapters::MySQL::TableDefinition
- Inherits:
-
TableDefinition
- Object
- TableDefinition
- ActiveRecord::ConnectionAdapters::MySQL::TableDefinition
- Includes:
- ColumnMethods
- Defined in:
- lib/active_record/connection_adapters/mysql/schema_definitions.rb
Instance Attribute Summary
Attributes inherited from TableDefinition
#as, #comment, #foreign_keys, #if_not_exists, #indexes, #name, #options, #temporary
Instance Method Summary collapse
Methods inherited from TableDefinition
#[], #column, #columns, #foreign_key, #index, #initialize, #primary_keys, #references, #remove_column, #timestamps
Methods included from ColumnMethods
Constructor Details
This class inherits a constructor from ActiveRecord::ConnectionAdapters::TableDefinition
Instance Method Details
#new_column_definition(name, type, **options) ⇒ Object
:nodoc:
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 63 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 |