This commit is contained in:
@@ -462,7 +462,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
|
||||
//Add widget table
|
||||
//id, TEXT, longtext, boolean, currency,
|
||||
await ExecQueryAsync("CREATE TABLE awidget (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, serial BIGINT generated by default as identity NOT NULL," +
|
||||
await ExecQueryAsync("CREATE TABLE awidget (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, serial BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL," +
|
||||
"startdate TIMESTAMP, enddate TIMESTAMP, dollaramount DECIMAL(19,4), active BOOL NOT NULL, usertype int4, count INTEGER," +
|
||||
"notes TEXT, userid BIGINT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY)");
|
||||
|
||||
@@ -731,7 +731,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
"datestarted TIMESTAMP NULL, datecompleted TIMESTAMP NULL, projectoverseerid BIGINT NULL REFERENCES auser(id), accountnumber TEXT)");
|
||||
|
||||
//PURCHASEORDER
|
||||
await ExecQueryAsync("CREATE TABLE apurchaseorder (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, serial BIGINT generated by default as identity NOT NULL, " +
|
||||
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"
|
||||
@@ -777,7 +777,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
|
||||
//----------
|
||||
//WORKORDER
|
||||
await ExecQueryAsync("CREATE TABLE aworkorder (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, serial BIGINT generated by default as identity NOT NULL, active BOOL NOT NULL, " +
|
||||
await ExecQueryAsync("CREATE TABLE aworkorder (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 aworkorderitem (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderid BIGINT NOT NULL REFERENCES aworkorder (id), " +
|
||||
@@ -829,7 +829,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
"notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY )");
|
||||
|
||||
//QUOTE
|
||||
await ExecQueryAsync("CREATE TABLE aquote (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, serial BIGINT generated by default as identity NOT NULL, active BOOL NOT NULL, " +
|
||||
await ExecQueryAsync("CREATE TABLE aquote (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 )");
|
||||
|
||||
//QUOTEITEM
|
||||
@@ -845,7 +845,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
"notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY )");
|
||||
|
||||
//PM
|
||||
await ExecQueryAsync("CREATE TABLE apm (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, serial BIGINT generated by default as identity NOT NULL, active BOOL NOT NULL, " +
|
||||
await ExecQueryAsync("CREATE TABLE apm (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 )");
|
||||
|
||||
//PMITEM
|
||||
|
||||
@@ -1700,7 +1700,7 @@ namespace AyaNova.Util
|
||||
for (int x = 0; x < count; x++)
|
||||
{
|
||||
PurchaseOrder o = new PurchaseOrder();
|
||||
o.VendorId = Fake.Random.Long(1, TotalSeededVendors);
|
||||
o.VendorId = Fake.Random.Long(1, TotalSeededVendors);
|
||||
var poDate = Fake.Date.Between(seedStartWindow, seedEndWindow);
|
||||
o.OrderedDate = poDate.ToUniversalTime();
|
||||
o.ExpectedReceiveDate = poDate.AddDays(5).ToUniversalTime();
|
||||
|
||||
Reference in New Issue
Block a user