This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
|||||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||||
|
|||||||
@@ -679,6 +679,17 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
await ExecQueryAsync("ALTER TABLE acustomer add column headofficeid bigint null references aheadoffice");
|
await ExecQueryAsync("ALTER TABLE acustomer add column headofficeid bigint null references aheadoffice");
|
||||||
await ExecQueryAsync("ALTER TABLE auser add FOREIGN KEY (headofficeid) REFERENCES aheadoffice(id)");
|
await ExecQueryAsync("ALTER TABLE auser add FOREIGN KEY (headofficeid) REFERENCES aheadoffice(id)");
|
||||||
|
|
||||||
|
|
||||||
|
//VENDOR
|
||||||
|
await ExecQueryAsync("CREATE TABLE avendor (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, webaddress text, popupnotes text, accountnumber text, " +
|
||||||
|
"contact text, contactnotes text, phone1 text, phone2 text, phone3 text, phone4 text, phone5 text, emailaddress text, " +
|
||||||
|
"postaddress text, postcity text, postregion text, postcountry text, postcode text, address text, city text, region text, country text, latitude decimal(8,6), longitude decimal(9,6))");
|
||||||
|
await ExecQueryAsync("CREATE UNIQUE INDEX avendor_name_id_idx ON avendor (id, name);");
|
||||||
|
await ExecQueryAsync("CREATE INDEX avendor_tags ON avendor using GIN(tags)");
|
||||||
|
await ExecQueryAsync("ALTER TABLE auser add FOREIGN KEY (vendorid) REFERENCES avendor(id)");
|
||||||
|
|
||||||
|
|
||||||
//PART
|
//PART
|
||||||
await ExecQueryAsync("CREATE TABLE apart (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text, active bool not null, " +
|
await ExecQueryAsync("CREATE TABLE apart (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text, active bool not null, " +
|
||||||
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
|
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
|
||||||
@@ -692,8 +703,8 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
//PARTASSEMBLY
|
//PARTASSEMBLY
|
||||||
await ExecQueryAsync("CREATE TABLE apartassembly (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool not null, " +
|
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 )");
|
"notes text, wiki text, customfields text, tags varchar(255) ARRAY )");
|
||||||
await ExecQueryAsync("CREATE UNIQUE INDEX apart_name_id_idx ON apartassembly (id, name);");
|
await ExecQueryAsync("CREATE UNIQUE INDEX apartassembly_name_id_idx ON apartassembly (id, name);");
|
||||||
await ExecQueryAsync("CREATE INDEX apart_tags ON apartassembly using GIN(tags)");
|
await ExecQueryAsync("CREATE INDEX apartassembly_tags ON apartassembly using GIN(tags)");
|
||||||
|
|
||||||
//PARTASSEMBLYITEM
|
//PARTASSEMBLYITEM
|
||||||
await ExecQueryAsync("CREATE TABLE apartassemblyitem (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, partassemblyid bigint not null REFERENCES apartassembly, " +
|
await ExecQueryAsync("CREATE TABLE apartassemblyitem (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, partassemblyid bigint not null REFERENCES apartassembly, " +
|
||||||
@@ -714,15 +725,6 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
await ExecQueryAsync("CREATE UNIQUE INDEX apurchaseorder_serial_id_idx ON apurchaseorder (id, serial);");
|
await ExecQueryAsync("CREATE UNIQUE INDEX apurchaseorder_serial_id_idx ON apurchaseorder (id, serial);");
|
||||||
await ExecQueryAsync("CREATE INDEX apurchaseorder_tags ON apurchaseorder using GIN(tags)");
|
await ExecQueryAsync("CREATE INDEX apurchaseorder_tags ON apurchaseorder using GIN(tags)");
|
||||||
|
|
||||||
//VENDOR
|
|
||||||
await ExecQueryAsync("CREATE TABLE avendor (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, webaddress text, popupnotes text, accountnumber text, " +
|
|
||||||
"contact text, contactnotes text, phone1 text, phone2 text, phone3 text, phone4 text, phone5 text, emailaddress text, " +
|
|
||||||
"postaddress text, postcity text, postregion text, postcountry text, postcode text, address text, city text, region text, country text, latitude decimal(8,6), longitude decimal(9,6))");
|
|
||||||
await ExecQueryAsync("CREATE UNIQUE INDEX avendor_name_id_idx ON avendor (id, name);");
|
|
||||||
await ExecQueryAsync("CREATE INDEX avendor_tags ON avendor using GIN(tags)");
|
|
||||||
await ExecQueryAsync("ALTER TABLE auser add FOREIGN KEY (vendorid) REFERENCES avendor(id)");
|
|
||||||
|
|
||||||
//UNITMODEL
|
//UNITMODEL
|
||||||
await ExecQueryAsync("CREATE TABLE aunitmodel (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text null, active bool not null, " +
|
await ExecQueryAsync("CREATE TABLE aunitmodel (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text null, active bool not null, " +
|
||||||
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
|
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
|
||||||
|
|||||||
Reference in New Issue
Block a user