feat: Implements foreign key handling (#68)
This commit is contained in:
parent
e74caa1400
commit
4580326956
13 changed files with 6630 additions and 189 deletions
|
|
@ -0,0 +1,8 @@
|
|||
class: FkChainCascadeMiddle
|
||||
table: fk_chain_cascade_middle
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
root: FkChainRoot?, relation(field=rootId, onDelete=Cascade)
|
||||
rootId: UuidValue?
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class: FkChainMiddleCascadeChild
|
||||
table: fk_chain_middle_cascade_child
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
restrictBlocker: FkChainRestrictBlocker?, relation(field=restrictBlockerId, onDelete=Cascade)
|
||||
restrictBlockerId: UuidValue?
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class: FkChainMiddleSetNullChild
|
||||
table: fk_chain_middle_set_null_child
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
restrictBlocker: FkChainRestrictBlocker?, relation(field=restrictBlockerId, onDelete=SetNull)
|
||||
restrictBlockerId: UuidValue?
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class: FkChainRestrictBlocker
|
||||
table: fk_chain_restrict_blocker
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
cascadeMiddle: FkChainCascadeMiddle?, relation(field=cascadeMiddleId, onDelete=Restrict)
|
||||
cascadeMiddleId: UuidValue?
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
class: FkChainRoot
|
||||
table: fk_chain_root
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class: FkChainSetNullCascadeChild
|
||||
table: fk_chain_set_null_cascade_child
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
setNullMiddle: FkChainSetNullMiddle?, relation(field=setNullMiddleId, onDelete=Cascade)
|
||||
setNullMiddleId: UuidValue?
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class: FkChainSetNullMiddle
|
||||
table: fk_chain_set_null_middle
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
cascadeMiddle: FkChainCascadeMiddle?, relation(field=cascadeMiddleId, onDelete=SetNull)
|
||||
cascadeMiddleId: UuidValue?
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class: FkChainSetNullRestrictChild
|
||||
table: fk_chain_set_null_restrict_child
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
setNullMiddle: FkChainSetNullMiddle?, relation(field=setNullMiddleId, onDelete=Restrict)
|
||||
setNullMiddleId: UuidValue?
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class: FkChainSetNullSetNullChild
|
||||
table: fk_chain_set_null_set_null_child
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
setNullMiddle: FkChainSetNullMiddle?, relation(field=setNullMiddleId, onDelete=SetNull)
|
||||
setNullMiddleId: UuidValue?
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class: RequiredSetNullChild
|
||||
table: required_set_null_child
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
parent: Person?, relation(field=parentId, onDelete=SetNull)
|
||||
parentId: UuidValue
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class: RestrictChild
|
||||
table: restrict_child
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
parent: Person?, relation(field=parentId, onDelete=Restrict)
|
||||
parentId: UuidValue?
|
||||
|
|
@ -4,4 +4,5 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
city: City?, relation(optional, onDelete=Cascade)
|
||||
mayor: Person?, relation(optional, onDelete=SetNull)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
class: UniqueSetNullChild
|
||||
table: unique_set_null_child
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
name: String
|
||||
parent: Person?, relation(field=parentId, onDelete=SetNull)
|
||||
parentId: UuidValue?, unique
|
||||
Loading…
Reference in a new issue