123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::Migration::Compatibility::V6_0

Do not use. This class is for internal use only.

Instance Method Summary

Instance Method Details

#add_belongs_to(table_name, ref_name, **options)

Alias for #add_reference.

[ GitHub ]

  
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 282

alias :add_belongs_to :add_reference

#add_reference(table_name, ref_name, **options) Also known as: #add_belongs_to

[ GitHub ]

  
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 274

def add_reference(table_name, ref_name, **options)
  if connection.adapter_name == "SQLite"
    options[:type] = :integer
  end

  options[:_uses_legacy_reference_index_name] = true
  super
end

#compatible_table_definition(t) (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 285

def compatible_table_definition(t)
  t.singleton_class.prepend(TableDefinition)
  super
end