Migrator
references()
Signature
Section titled “Signature”references() — returns any
Available in: tabledefinition
Category: Table Definition Functions
Description
Section titled “Description”adds integer reference columns to table definition and creates foreign key constraints
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
referenceNames | string | yes | — | |
default | string | no | — | |
null | boolean | no | false | |
polymorphic | boolean | no | false | |
foreignKey | boolean | no | true | |
onUpdate | string | no | — | |
onDelete | string | no | — |