clean up migrate_outstanding stuff
This commit is contained in:
@@ -711,11 +711,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
//PART INVENTORY VIEW
|
||||
await ExecQueryAsync("CREATE VIEW vpartinventorynow AS WITH T AS (SELECT *, ROW_NUMBER() OVER(PARTITION BY partid, partwarehouseid ORDER BY entrydate DESC) AS rn FROM apartinventory) SELECT * FROM T WHERE rn = 1");
|
||||
|
||||
//MIGRATE_OUTSTANDING: index(s) to support inventory ops
|
||||
//recheck this again once have full inventory in place and run some manual queries taken from inventory methods and issued by ef core
|
||||
//see what if any index tuning will help with a huge db of realistic data doing most common ops
|
||||
//await ExecQueryAsync("CREATE INDEX idx_PartInventory_SourceId_SourceType ON apartinventory (sourceid, sourcetype);");
|
||||
|
||||
|
||||
//PARTSTOCKLEVEL
|
||||
await ExecQueryAsync("CREATE TABLE apartstocklevel (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, partwarehouseid BIGINT NOT NULL REFERENCES apartwarehouse ON DELETE CASCADE, "
|
||||
+ "partid BIGINT NOT NULL REFERENCES apart ON DELETE CASCADE, minimumquantity DECIMAL(19,5) NOT NULL default 1, "
|
||||
|
||||
Reference in New Issue
Block a user