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

Inherits:
V6_1 show all
Defined in:
activerecord/lib/active_record/migration/compatibility.rb

Direct Known Subclasses

V5_2

Defined Under Namespace

Modules: TableDefinition Classes: ReferenceDefinition

Instance Method Summary collapse

Methods inherited from V6_1

#add_column, #change_column

Methods inherited from V7_0

#add_column, #add_foreign_key, #add_index, #change_column, #change_column_null, #create_table, #disable_extension, #rename_table

Instance Method Details

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



232
233
234
235
236
237
238
239
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 232

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