This commit is contained in:
2023-01-23 19:58:57 +00:00
parent 266a56c43d
commit 209acc33e8

View File

@@ -22,16 +22,16 @@ namespace Sockeye.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 17;
internal const long EXPECTED_COLUMN_COUNT = 527;
internal const long EXPECTED_COLUMN_COUNT = 528;
internal const long EXPECTED_INDEX_COUNT = 75;
internal const long EXPECTED_CHECK_CONSTRAINTS = 251;
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 36;
internal const long EXPECTED_CHECK_CONSTRAINTS = 250;
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 37;
internal const long EXPECTED_VIEWS = 0;
internal const long EXPECTED_ROUTINES = 2;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
///////////////////////////////////////// C527:I75:CC251:FC36:V0:R2
///////////////////////////////////////// (C528:I75:CC250:FC37:V0:R2)
/*
MAXIMUM POSTGRES OBJECT NAME LENGTH: 63 CHARACTERS
@@ -892,7 +892,6 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
+ "trial BOOL NOT NULL DEFAULT true, trialcontact TEXT, trialemail TEXT, trialcompany TEXT, operatingsystem TEXT, customersubdomain TEXT, cost DECIMAL(38,18) NOT NULL default 7, "
+ "wiki TEXT, tags VARCHAR(255) ARRAY, customerid BIGINT REFERENCES acustomer(id) )");
await ExecQueryAsync("CREATE TABLE aproduct (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, active BOOL NOT NULL DEFAULT true, "
+ "vendorid BIGINT NOT NULL REFERENCES avendor(id), pgroup INTEGER NOT NULL DEFAULT 0, licenseinterval INTERVAL, maintinterval INTERVAL, vendorcode TEXT NOT NULL UNIQUE, ourcode TEXT NOT NULL UNIQUE, "
+ "wiki TEXT, tags VARCHAR(255) ARRAY )");
@@ -903,22 +902,16 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
await ExecQueryAsync("CREATE TABLE apurchase (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, customerid BIGINT REFERENCES acustomer(id) ON DELETE CASCADE, "
+ "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 NOT NULL DEFAULT 'USD', purchasedate TIMESTAMPTZ NOT NULL, expiredate TIMESTAMPTZ, canceldate TIMESTAMPTZ, couponcode text, notes text, "
+ "currency TEXT, purchasedate TIMESTAMPTZ NOT NULL, expiredate TIMESTAMPTZ, canceldate TIMESTAMPTZ, couponcode text, notes text, "
+ "renewnoticesent BOOL NOT NULL DEFAULT false, quantity INTEGER NOT NULL DEFAULT 1, "
+ "vendornotificationid BIGINT REFERENCES avendornotification(id), processed BOOL NOT NULL DEFAULT false, "
+ "vendornotificationid BIGINT REFERENCES avendornotification(id), licenseid BIGINT REFERENCES alicense(id), processed BOOL NOT NULL DEFAULT false, "
+ "wiki TEXT, tags VARCHAR(255) ARRAY )");
await ExecQueryAsync("CREATE TABLE agzcase (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, caseid BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, "
+ "created TIMESTAMPTZ NOT NULL, closed TIMESTAMPTZ, name TEXT NOT NULL, notes TEXT, "
+ "wiki TEXT, tags VARCHAR(255) ARRAY, customerid BIGINT REFERENCES acustomer(id) )");
//**************** TRANSLATIONS **********************
#region LICENSE
//english translations