feat: Require scopeId cascade FK relation to crdt_scopes for synced tables (#79)
Co-authored-by: Marcelo Soares <marcelo.me.soares@gmail.com>
This commit is contained in:
parent
38fa00ddfc
commit
5642d9b94d
25 changed files with 393 additions and 35 deletions
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
street: String
|
||||
inhabitantId: UuidValue?, unique
|
||||
inhabitant: Person?, relation(name=person_address, field=inhabitantId, onDelete=Restrict)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
citizens: List<Person>?, relation
|
||||
organizations: List<Organization>?, relation(name=city_org)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
town: Town?, relation(field=townId, onDelete=SetDefault)
|
||||
townId: UuidValue, default='550e8400-e29b-41d4-a716-446655440000'
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
root: FkChainRoot?, relation(field=rootId, onDelete=Cascade)
|
||||
rootId: UuidValue?
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
restrictBlocker: FkChainRestrictBlocker?, relation(field=restrictBlockerId, onDelete=Cascade)
|
||||
restrictBlockerId: UuidValue?
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
restrictBlocker: FkChainRestrictBlocker?, relation(field=restrictBlockerId, onDelete=SetNull)
|
||||
restrictBlockerId: UuidValue?
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
cascadeMiddle: FkChainCascadeMiddle?, relation(field=cascadeMiddleId, onDelete=Restrict)
|
||||
cascadeMiddleId: UuidValue?
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
setNullMiddle: FkChainSetNullMiddle?, relation(field=setNullMiddleId, onDelete=Cascade)
|
||||
setNullMiddleId: UuidValue?
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
cascadeMiddle: FkChainCascadeMiddle?, relation(field=cascadeMiddleId, onDelete=SetNull)
|
||||
cascadeMiddleId: UuidValue?
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
setNullMiddle: FkChainSetNullMiddle?, relation(field=setNullMiddleId, onDelete=Restrict)
|
||||
setNullMiddleId: UuidValue?
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
setNullMiddle: FkChainSetNullMiddle?, relation(field=setNullMiddleId, onDelete=SetNull)
|
||||
setNullMiddleId: UuidValue?
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
people: List<Person>?, relation(name=org_person)
|
||||
city: City?, relation(name=city_org, optional, onDelete=Cascade)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
surname: String?
|
||||
address: Address?, relation(name=person_address)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
parent: Person?, relation(field=parentId, onDelete=SetNull)
|
||||
parentId: UuidValue
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
parent: Person?, relation(field=parentId, onDelete=Restrict)
|
||||
parentId: UuidValue?
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String
|
||||
city: City?, relation(optional, onDelete=Cascade)
|
||||
mayor: Person?, relation(optional, onDelete=SetNull)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
aBool: bool
|
||||
aDateTime: DateTime
|
||||
aText: String
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
name: String, unique(per=scopeId)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ database: all
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
### This scope field has no relation with the CRDT sync layer.
|
||||
scope: String
|
||||
value: String, unique(per=[scopeId, scope])
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue