Module: ActiveRecord::Migration::Compatibility::V6_0::SQLite3::TableDefinition

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

Instance Method Summary collapse

Instance Method Details

#column(name, type, index: nil, **options) ⇒ Object



34
35
36
37
# File 'lib/active_record/migration/compatibility.rb', line 34

def column(name, type, index: nil, **options)
  options[:precision] ||= nil
  super
end

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



27
28
29
30
31
# File 'lib/active_record/migration/compatibility.rb', line 27

def references(*args, **options)
  args.each do |ref_name|
    ReferenceDefinition.new(ref_name, type: :integer, **options).add_to(self)
  end
end