This commit is contained in:
2023-02-06 20:05:24 +00:00
parent 9e946cc8a3
commit 347b202f91
5 changed files with 58 additions and 3 deletions

View File

@@ -899,7 +899,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
await ExecQueryAsync("CREATE TABLE avendornotification (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created TIMESTAMPTZ NOT NULL, vendorid BIGINT NOT NULL REFERENCES avendor(id), "
+ "vendordata TEXT, processed TIMESTAMPTZ, tags VARCHAR(255) ARRAY )");
await ExecQueryAsync("CREATE TABLE apurchase (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, customerid BIGINT REFERENCES acustomer(id) ON DELETE CASCADE, "
await ExecQueryAsync("CREATE TABLE apurchase (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, customerid BIGINT REFERENCES acustomer(id) ON DELETE CASCADE, regto TEXT NOT NULL, "
+ "vendorid BIGINT NOT NULL REFERENCES avendor(id), productid BIGINT REFERENCES aproduct(id), pgroup INTEGER NOT NULL DEFAULT 4, salesordernumber TEXT NOT NULL, "
+ "productnet DECIMAL(38,18) NOT NULL default 0, discount DECIMAL(38,18) NOT NULL default 0, vendorfee DECIMAL(38,18) NOT NULL default 0, revenue DECIMAL(38,18) NOT NULL default 0, "
+ "currency TEXT, purchasedate TIMESTAMPTZ NOT NULL, expiredate TIMESTAMPTZ, canceldate TIMESTAMPTZ, couponcode text, notes text, "