RelationPlan
Interface: RelationPlan
Defined in: packages/sql-schema/src/plan.ts:114
A relation of a model
Properties
attribute
attribute:
string
Defined in: packages/sql-schema/src/plan.ts:119
foreignKey?
optionalforeignKey?:string
Defined in: packages/sql-schema/src/plan.ts:140
Name of the foreign key constraint, undefined when the target is not in this plan or foreign keys are disabled
keySeparator?
optionalkeySeparator?:string
Defined in: packages/sql-schema/src/plan.ts:144
Separator joining the target composite key into the string the model stores
kind
kind:
RelationKind
Defined in: packages/sql-schema/src/plan.ts:120
model
model:
string
Defined in: packages/sql-schema/src/plan.ts:118
Model declaring the relation
onDelete?
optionalonDelete?:DeletePolicy
Defined in: packages/sql-schema/src/plan.ts:136
ON DELETE of the constraint, when one is created
storage
storage:
RelationStorage
Defined in: packages/sql-schema/src/plan.ts:145
target?
optionaltarget?:string
Defined in: packages/sql-schema/src/plan.ts:124
Identifier of the related model, undefined when it cannot be resolved
targetAttribute?
optionaltargetAttribute?:string
Defined in: packages/sql-schema/src/plan.ts:128
For a query: the attribute of the target model linking back to this model
unique?
optionalunique?:boolean
Defined in: packages/sql-schema/src/plan.ts:132
OneToOne: one row at most per target