This commit is contained in:
2021-01-18 20:12:41 +00:00
parent 4b2e972580
commit 13f04cffbf
5 changed files with 17 additions and 4 deletions

View File

@@ -671,7 +671,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
//PARTASSEMBLYITEM
await ExecQueryAsync("CREATE TABLE apartassemblyitem (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, partassemblyid bigint not null REFERENCES apartassembly on delete cascade, " +
"partid bigint not null REFERENCES apart, " +
"partid bigint not null REFERENCES apart, quantity decimal(19,4) not null default 1, " +
"CONSTRAINT UNQ_PartAssemblyPart UNIQUE (partid, partassemblyid) " +//ensure no duplicate parts in the same assembly
")");
// await ExecQueryAsync("CREATE INDEX idx_apartassemblyitem_partid ON apartassemblyitem(partid)");