Skip to main content

junctionForeignKeyAction

@webda/sql-schema


Function: junctionForeignKeyAction()

junctionForeignKeyAction(policy): ForeignKeyAction

Defined in: packages/sql-schema/src/metadata.ts:214

ON DELETE of the target foreign key of a junction table, from the delete policy of its link array relation

A row of the junction is an item of the array: SET_NULL removes it with the target (CASCADE). Deleting the owners of a CASCADE array is the runtime work of the RelationIntegrity service, not of the junction.

Parameters​

policy​

DeletePolicy | undefined

the delete policy

Returns​

ForeignKeyAction

the SQL action