# File lib/activerecord-mysql-unsigned/active_record/v3/connection_adapters/abstract/schema_definitions.rb, line 14 def primary_key(name, type = :primary_key, options = {}) column(name, type, options.merge(primary_key: true).reverse_merge(unsigned: true)) end
class ActiveRecord::ConnectionAdapters::TableDefinition
Public Instance Methods
column(name, type, options = {})
click to toggle source
# File lib/activerecord-mysql-unsigned/active_record/v3/connection_adapters/abstract/schema_definitions.rb, line 19 def column(name, type, options = {}) column_without_unsigned(name, type, options) column = self[name] column.unsigned = options[:unsigned] self end
Also aliased as: column_without_unsigned
new_column_definition(name, type, options)
click to toggle source
# File lib/activerecord-mysql-unsigned/active_record/v4/connection_adapters/abstract/schema_definitions.rb, line 15 def new_column_definition(name, type, options) column = new_column_definition_without_unsigned(name, type, options) column.unsigned = options[:unsigned] column end
Also aliased as: new_column_definition_without_unsigned
primary_key(name, type = :primary_key, options = {})
click to toggle source