Module: ActiveRecord::Mysql::Awesome::ColumnMethods

Included in:
Table, TableDefinition
Defined in:
lib/activerecord-mysql-awesome/active_record/connection_adapters/abstract_mysql_adapter.rb

Instance Method Summary collapse

Instance Method Details

#primary_key(name, type = :primary_key, **options) ⇒ Object



10
11
12
13
# File 'lib/activerecord-mysql-awesome/active_record/connection_adapters/abstract_mysql_adapter.rb', line 10

def primary_key(name, type = :primary_key, **options)
  options[:auto_increment] = true if type == :bigint
  super
end

#unsigned_integer(*args, **options) ⇒ Object



15
16
17
# File 'lib/activerecord-mysql-awesome/active_record/connection_adapters/abstract_mysql_adapter.rb', line 15

def unsigned_integer(*args, **options)
  args.each { |name| column(name, :unsigned_integer, options) }
end