From 4a3e7dbcb33469d10c734e5a6f03942397717e78 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 17 Nov 2020 16:05:47 +0000 Subject: [PATCH] --- .vscode/launch.json | 2 +- server/AyaNova/models/UserOptions.cs | 6 ++++++ server/AyaNova/util/AySchema.cs | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 0e2049e9..8fd97968 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -53,7 +53,7 @@ "AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles", "AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles", "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_TZ_OFFSET": "-7", "AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\" diff --git a/server/AyaNova/models/UserOptions.cs b/server/AyaNova/models/UserOptions.cs index 33ae547b..7d95afe6 100644 --- a/server/AyaNova/models/UserOptions.cs +++ b/server/AyaNova/models/UserOptions.cs @@ -14,6 +14,12 @@ namespace AyaNova.Models //------------- [EmailAddress] public string EmailAddress { get; set; } + [Phone] + public string Phone1 { get; set; } + [Phone] + public string Phone2 { get; set; } + //in v7 this was pager address so not attributing it with Phone as not sure what would be in that field + public string Phone3 { get; set; } /* Hexadecimal notation: #RGB[A] diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 7e5f2d84..c9f20f41 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -22,7 +22,7 @@ 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 = 445; + internal const long EXPECTED_COLUMN_COUNT = 448; internal const long EXPECTED_INDEX_COUNT = 144; //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!! @@ -338,7 +338,7 @@ $BODY$; //Add user options table await ExecQueryAsync("CREATE TABLE auseroptions (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, " + "userid bigint not null REFERENCES auser (id), translationid bigint not null REFERENCES atranslation (id), languageoverride text, timezoneoverride text, " + - "currencyname text, hour12 bool not null, emailaddress text, uicolor varchar(12) not null default '#000000', mapurltemplate text)"); + "currencyname text, hour12 bool not null, emailaddress text, phone1 text, phone2 text, phone3 text, uicolor varchar(12) not null default '#000000', mapurltemplate text)"); //Prime the db with the default SuperUser account @@ -485,8 +485,8 @@ $BODY$; await ExecQueryAsync("CREATE TABLE acustomer (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null unique, active bool, " + "notes text, wiki text, customfields text, tags varchar(255) ARRAY, " + "webaddress text, popupnotes text, billheadoffice bool, technotes text, accountnumber text, usesbanking bool, contractexpires timestamp null, " + - "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))"); + "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 acustomer_name_id_idx ON acustomer (id, name);"); await ExecQueryAsync("CREATE INDEX acustomer_tags ON acustomer using GIN(tags)");