Skip to content

Migrator

addReference()

addReference() — returns void

Available in: migration Category: Migration Functions

Add a foreign key constraint to the database, using the reference name that was used to create it Only available in a migration CFC

NameTypeRequiredDefaultDescription
tablestringyesThe table name to perform the operation on
referenceNamestringyesThe reference table name to perform the operation on