Module: ActiveRecord::Migration::Compatibility::V5_0::TableDefinition

Defined in:
activerecord/lib/active_record/migration/compatibility.rb

Instance Method Summary collapse

Instance Method Details

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


299
300
301
302
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 299

def primary_key(name, type = :primary_key, **options)
  type = :integer if type == :primary_key
  super
end

#references(*args, **options) ⇒ Object Also known as: belongs_to


304
305
306
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 304

def references(*args, **options)
  super(*args, type: :integer, **options)
end