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
1 changed files with 393 additions and 35 deletions
|
|
@ -24,7 +24,7 @@ The ownership link is:
|
|||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?, relation(optional, parent=crdt_scopes, onDelete=Cascade)
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
```
|
||||
|
||||
`scopeId == null` remains valid persisted state, but it means the row is
|
||||
|
|
@ -262,7 +262,7 @@ The error message should explain the allowed alternatives:
|
|||
|
||||
The implementation issue should add schema/initialize tests for:
|
||||
|
||||
- accepting `scopeId: int?, relation(optional, parent=crdt_scopes,
|
||||
- accepting `scopeId: int?, relation(parent=crdt_scopes,
|
||||
onDelete=Cascade)` on every synced table;
|
||||
- rejecting `sync -> non-sync` restricted reference-table FKs with
|
||||
`onDelete=Restrict` while the reference-data sync phase is absent;
|
||||
|
|
|
|||
Loading…
Reference in a new issue