From 273004350726dd69898e99987cf2fad13edf08c9 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 17 Jan 2019 16:34:59 +0000 Subject: [PATCH] --- devdocs/todo.txt | 3 --- server/AyaNova/models/License.cs | 4 ++-- server/AyaNova/util/AySchema.cs | 40 ++++++++++++++++---------------- server/AyaNova/util/License.cs | 4 ++-- 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 1fadd694..1dc9d83a 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -16,9 +16,6 @@ SERVER - DO ALL THE THINGS!!!! - all the way down to DOCS MANUAL below which isn't urgent and go back to client stuff - - PickListFetcher: WTF? It has a reference to widgetbiz in it, isn't this a generic class?? - - - AySchema: License table extra fields, remove any not required (also in model and code) - Resource localization edit all Custom field locale keys for all langauges and change to be 1 to 16 (remove 0 and add 6 more) - So, for example ClientCustom0 becomes ClientCustom1 and make sure the display values are identical as right now there are "My Custom0" and "Custom Field 8" in the same bunch diff --git a/server/AyaNova/models/License.cs b/server/AyaNova/models/License.cs index 88ed617c..921ece974 100644 --- a/server/AyaNova/models/License.cs +++ b/server/AyaNova/models/License.cs @@ -10,8 +10,8 @@ namespace AyaNova.Models public long Id { get; set; } public string Key { get; set; } public Guid DbId { get; set; } - public int LastFetchStatus { get; set; } - public string LastFetchMessage { get; set; } + //public int LastFetchStatus { get; set; } + // public string LastFetchMessage { get; set; } diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index 53cd2a64..7d629edd 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -20,9 +20,9 @@ namespace AyaNova.Util /////////// CHANGE THIS ON NEW SCHEMA UPDATE //////////////////// //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!! - private const int DESIRED_SCHEMA_LEVEL = 10; + private const int DESIRED_SCHEMA_LEVEL = 9; - internal const long EXPECTED_COLUMN_COUNT = 104; + internal const long EXPECTED_COLUMN_COUNT = 102; internal const long EXPECTED_INDEX_COUNT = 24; //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!! @@ -191,7 +191,7 @@ namespace AyaNova.Util LogUpdateMessage(log); //Add user table - exec("CREATE TABLE alicense (id BIGSERIAL PRIMARY KEY, key text not null)"); + exec("CREATE TABLE alicense (id BIGSERIAL PRIMARY KEY, dbid uuid, key text not null)"); setSchemaLevel(++currentSchema); } @@ -256,27 +256,27 @@ namespace AyaNova.Util } - ////////////////////////////////////////////////// - //LICENSE table new columns - //LOOKAT: DO I need this anymore??? - //answer: no because it relates to ops stuff in other tables and logging, not to the license itself (except maybe dbid?) - if (currentSchema < 7) - { - LogUpdateMessage(log); + // ////////////////////////////////////////////////// + // //LICENSE table new columns + // //LOOKAT: DO I need this anymore??? + // //answer: no because it relates to ops stuff in other tables and logging, not to the license itself (except maybe dbid?) + // if (currentSchema < 7) + // { + // LogUpdateMessage(log); - //Add license related stuff - exec("ALTER TABLE alicense ADD COLUMN dbid uuid"); - exec("ALTER TABLE alicense ADD COLUMN LastFetchStatus integer"); - exec("ALTER TABLE alicense ADD COLUMN LastFetchMessage text"); + // //Add license related stuff + // exec("ALTER TABLE alicense ADD COLUMN dbid uuid"); + // exec("ALTER TABLE alicense ADD COLUMN LastFetchStatus integer"); + // exec("ALTER TABLE alicense ADD COLUMN LastFetchMessage text"); - setSchemaLevel(++currentSchema); - } + // setSchemaLevel(++currentSchema); + // } ////////////////////////////////////////////////// //DATAFILTER table - if (currentSchema < 8) + if (currentSchema < 7) { LogUpdateMessage(log); @@ -288,7 +288,7 @@ namespace AyaNova.Util ////////////////////////////////////////////////// // TAGS repository - if (currentSchema < 9) + if (currentSchema < 8) { LogUpdateMessage(log); exec("CREATE TABLE atag (id BIGSERIAL PRIMARY KEY, name varchar(255) not null, refcount bigint not null, UNIQUE(name))"); @@ -299,7 +299,7 @@ namespace AyaNova.Util ////////////////////////////////////////////////// //FORMCUSTOM table - if (currentSchema < 10) + if (currentSchema < 9) { LogUpdateMessage(log); @@ -320,7 +320,7 @@ namespace AyaNova.Util ////////////////////////////////////////////////// // FUTURE - // if (currentSchema < 9) + // if (currentSchema < 10) // { // LogUpdateMessage(log); diff --git a/server/AyaNova/util/License.cs b/server/AyaNova/util/License.cs index 3747571f..bb24807d 100644 --- a/server/AyaNova/util/License.cs +++ b/server/AyaNova/util/License.cs @@ -431,9 +431,9 @@ namespace AyaNova.Core { ldb = new Models.License(); ldb.DbId = Guid.NewGuid(); - ldb.LastFetchStatus = 0; + //ldb.LastFetchStatus = 0; ldb.Key = "none"; - ldb.LastFetchMessage = "none"; + //ldb.LastFetchMessage = "none"; ctx.License.Add(ldb); ctx.SaveChanges(); }