fix: Allow only one releasable column per unique index (#91)
This commit is contained in:
parent
8acfa7f269
commit
af139ea800
4 changed files with 353 additions and 112 deletions
|
|
@ -24,6 +24,7 @@ final demoSyncTables = <Table>[
|
|||
Types.t,
|
||||
Unique.t,
|
||||
UniqueComposite.t,
|
||||
UniqueDiscriminator.t,
|
||||
UniqueSetNullChild.t,
|
||||
UniqueUuid.t,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ class DemoDebugEndpoint extends Endpoint {
|
|||
await add<Unique>();
|
||||
await add<UniqueUuid>();
|
||||
await add<UniqueComposite>();
|
||||
await add<UniqueDiscriminator>();
|
||||
await add<UniqueSetNullChild>();
|
||||
await add<Types>();
|
||||
await add<FkChainRoot>();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
class: UniqueDiscriminator
|
||||
table: unique_discriminator
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
categoryId: int
|
||||
name: String, unique(per=[scopeId, categoryId])
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
class: UniqueNoRelease
|
||||
table: unique_no_release
|
||||
database: all
|
||||
fields:
|
||||
id: UuidValue?, defaultPersist=random_v7
|
||||
### Owner scope of this row. Maintained by the CRDT sync layer.
|
||||
scopeId: int?, relation(parent=crdt_scopes, onDelete=Cascade)
|
||||
categoryId: int, unique(per=[scopeId])
|
||||
Loading…
Reference in a new issue