This commit is contained in:
2021-02-16 00:14:55 +00:00
parent fd1c19bc91
commit 31a66de8a5
3 changed files with 33 additions and 7 deletions

View File

@@ -733,8 +733,13 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
//PURCHASEORDER
//Note don't forget to update name fetcher stored procedure when change this to serial from name
await ExecQueryAsync("CREATE TABLE apurchaseorder (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, serial BIGINT generated by default as identity NOT NULL, active BOOL NOT NULL, " +
"notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY )");
await ExecQueryAsync("CREATE TABLE apurchaseorder (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, serial BIGINT generated by default as identity NOT NULL, " +
"notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, " +
"vendormemo TEXT, dropshiptocustomerid BIGINT REFERENCES acustomer, referencenumber TEXT, vendorid BIGINT NOT NULL REFERENCES avendor, " +
"ordereddate TIMESTAMP, expectedreceivedate TIMESTAMP, status integer CONSTRAINT chk_status_valid CHECK (status > 0 AND status < 7), " +//"a check constraint is satisfied if the check expression evaluates to true or the null value"
"projectid BIGINT REFERENCES aproject, text1 TEXT, text2 TEXT " +
" )");
//UNITMODEL
await ExecQueryAsync("CREATE TABLE aunitmodel (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NULL, active BOOL NOT NULL, " +