123456789_123456789_123456789_123456789_123456789_

Module: ActiveRecord::ConnectionAdapters::ColumnMethods

Instance Method Summary

Instance Method Details

#numeric

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 236

alias_method :numeric, :decimal

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

Appends a primary key definition to the table definition. Can be called multiple times, but this is probably not a good idea.

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 204

def primary_key(name, type = :primary_key, **options)
  column(name, type, options.merge(primary_key: true))
end