method
add_to
v7.0.0 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::ReferenceDefinition
add_to(table)public
No documentation available.
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 174
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