foreignKey
Creates a composite foreign key.
Parameters
Columns in this referencing child table that compose the foreign key. Their order should match the order of columns in the referenced parent table's primary key.
Primary key of the referenced parent table.
ReferenceOption when performing update operations.
ReferenceOption when performing delete operations.
Custom foreign key constraint name.
Samples
org.jetbrains.exposed.sql.tests.shared.ddl.CreateMissingTablesAndColumnsTests.CompositeForeignKeyTableCreates a composite foreign key.
Parameters
Pairs of child table and parent table columns that compose the foreign key. The first value of each pair should be a column from this referencing child table, with the second value being a column from the referenced parent table. All referencing columns must belong to this table. All referenced columns must belong to the same table.
ReferenceOption when performing update operations.
ReferenceOption when performing delete operations.
Custom foreign key constraint name.