method
references
v5.2.3 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::TableDefinition
references(*args, **options)public
Adds a reference.
t.references(:user) t.belongs_to(:supplier, foreign_key: true)
See {connection.add_reference}[rdoc-ref:SchemaStatements#add_reference] for details of the options you can use.
1Note
See column
See the end part of the docs on column for example uses.