This commit is contained in:
2021-01-19 22:15:32 +00:00
parent 8a52b60f2a
commit 26ca0872a1
4 changed files with 61 additions and 4 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 = 669;
internal const long EXPECTED_INDEX_COUNT = 117;
internal const long EXPECTED_COLUMN_COUNT = 676;
internal const long EXPECTED_INDEX_COUNT = 119;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
@@ -665,8 +665,13 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
"cost decimal(19,4) not null, retail decimal(19,4) not null, unitofmeasure text, upc text " +
" )");
//PARTWAREHOUSE
await ExecQueryAsync("CREATE TABLE apartwarehouse (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)");
await ExecQueryAsync("INSERT INTO apartwarehouse(name, active) VALUES ('#1', true);");
//PARTSERIAL
await ExecQueryAsync("CREATE TABLE apartserial (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, serial text not null, "+
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