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
- #primary_key(name, type = :primary_key, **options) ⇒ Object
- #unsigned_integer(*args, **options) ⇒ Object
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, **) [: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, **) args.each { |name| column(name, :unsigned_integer, ) } end |