class ActiveRecord::ConnectionAdapters::ReferenceDefinition

def add_to(table)

def add_to(table)
  columns.each do |name, type, options|
    table.column(name, type, **options)
  end
  if index
    table.index(column_names, **index_options(table.name))
  end
  if foreign_key
    table.foreign_key(foreign_table_name, **foreign_key_options)
  end
end