This commit is contained in:
2021-01-19 00:53:49 +00:00
parent 247c600e15
commit 4e15728207
6 changed files with 66 additions and 5 deletions

View File

@@ -22,8 +22,8 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 15;
internal const long EXPECTED_COLUMN_COUNT = 666;
internal const long EXPECTED_INDEX_COUNT = 115;
internal const long EXPECTED_COLUMN_COUNT = 669;
internal const long EXPECTED_INDEX_COUNT = 117;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
@@ -665,6 +665,10 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
"cost decimal(19,4) not null, retail decimal(19,4) not null, unitofmeasure text, upc text " +
" )");
//PARTSERIAL
await ExecQueryAsync("CREATE TABLE apartserial (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, serial text not null, "+
"partid bigint not null REFERENCES apart on delete cascade, CONSTRAINT UNQ_PartSerialPart UNIQUE (partid, serial) )");//ensure not duplicate partid/serial combo
//PARTASSEMBLY
await ExecQueryAsync("CREATE TABLE apartassembly (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool not null, " +
"notes text, wiki text, customfields text, tags varchar(255) ARRAY )");