class ActiveRecord::Migration::Compatibility::V6_0

def add_reference(table_name, ref_name, **options)

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

def compatible_table_definition(t)

def compatible_table_definition(t)
  class << t
    prepend TableDefinition
  end
  super
end