deferrable

Same as calling deferrable(allow = true)


This corresponds to the DEFERRABLE clause in a FOREIGN KEY definition.

When a constraint is DEFERRABLE, its checking can be postponed until the end of the current transaction. This corresponds to the Initially.DEFERRED or Initially.IMMEDIATE

Example

foreignKey(childColumn)
.references(ParentTable.parentColumn)
.deferrable(true) // Constraint can be deferred
.initially(Initially.DEFERRED) // Check at the end of the transaction

Return

The ForeignKeyConstraint instance for further chaining.

Author

MOHAMMAD AZIM ANSARI

Parameters

allow

If true, the constraint is DEFERRABLE. If false, it is NOT DEFERRABLE. Defaults to true.

See also