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
tablestringyes—The table name to perform the operation on
referenceNamestringyes—The reference table name to perform the operation on