This commit is contained in:
@@ -22,7 +22,7 @@ namespace AyaNova.Util
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
private const int DESIRED_SCHEMA_LEVEL = 1;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 1223;
|
||||
internal const long EXPECTED_COLUMN_COUNT = 1226;
|
||||
internal const long EXPECTED_INDEX_COUNT = 145;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 519;
|
||||
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 190;
|
||||
@@ -31,7 +31,7 @@ namespace AyaNova.Util
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
///////////////////////////////////////////////////////////////// C1223:I145:CC519:FC190:V7:R2
|
||||
///////////////////////////////////////////////////////////////// C1226:I145:CC519:FC190:V7:R2
|
||||
|
||||
/*
|
||||
|
||||
@@ -786,7 +786,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
await ExecQueryAsync("CREATE TABLE aworkorder (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, customerid BIGINT NOT NULL REFERENCES acustomer (id), "
|
||||
+ "projectid BIGINT REFERENCES aproject, laststatusid BIGINT REFERENCES aworkorderstatus(id), contractid BIGINT NULL, internalreferencenumber text, "
|
||||
+ " customerreferencenumber text, customercontactname text, createddate TIMESTAMP NOT NULL, "
|
||||
+ "customerreferencenumber text, customercontactname text, createddate TIMESTAMP NOT NULL, "
|
||||
+ "servicedate TIMESTAMP, completebydate TIMESTAMP, invoicenumber TEXT, customersignature TEXT, customersignaturename TEXT, customersignaturecaptured TIMESTAMP, "
|
||||
+ "techsignature TEXT, techsignaturename TEXT, techsignaturecaptured TIMESTAMP, durationtocompleted INTERVAL NOT NULL, onsite BOOL NOT NULL, "
|
||||
+ "postaddress TEXT, postcity TEXT, postregion TEXT, postcountry TEXT, postcode TEXT, address TEXT, city TEXT, region TEXT, country TEXT, latitude DECIMAL(9,6), longitude DECIMAL(9,6) "
|
||||
@@ -900,8 +900,6 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
+ "left outer join vpartsonorder on (vpartinventorynow.partid = vpartsonorder.partid and vpartinventorynow.partwarehouseid = vpartsonorder.partwarehouseid)");
|
||||
|
||||
|
||||
//VIEWWORKORDER - adds AGE expression column for datalist queries
|
||||
await ExecQueryAsync("CREATE VIEW viewworkorder AS select aworkorder.*, AGE(timezone('UTC', now()), aworkorder.createddate) as expwoage from aworkorder");
|
||||
|
||||
//----------
|
||||
|
||||
@@ -1097,6 +1095,9 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
//WORKORDER "FROM" LINKS
|
||||
await ExecQueryAsync("ALTER TABLE aworkorder ADD column fromquoteid BIGINT REFERENCES aquote (id), ADD column frompmid BIGINT REFERENCES apm (id), ADD column fromcsrid BIGINT REFERENCES acustomerservicerequest (id)");
|
||||
|
||||
//VIEWWORKORDER - adds AGE expression column for datalist queries
|
||||
await ExecQueryAsync("CREATE VIEW viewworkorder AS select aworkorder.*, AGE(timezone('UTC', now()), aworkorder.createddate) as expwoage from aworkorder");
|
||||
|
||||
|
||||
//NOTIFICATION
|
||||
await ExecQueryAsync("CREATE TABLE anotifysubscription (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, "
|
||||
|
||||
Reference in New Issue
Block a user