method

references

Importance_1
v6.0.0 - Show latest stable - 0 notes - Class: TableDefinition
references(*args, **options) public

Adds a reference.

t.references(:user)
t.belongs_to(:supplier, foreign_key: true)
t.belongs_to(:supplier, foreign_key: true, type: :integer)

See {connection.add_reference}[rdoc-ref:SchemaStatements#add_reference] for details of the options you can use.

Show source
Register or log in to add new notes.