From 3ca0b292f3bedb1e1f24fb9768117ec34bf3530b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 9 Jun 2020 17:50:36 +0000 Subject: [PATCH] --- notes/todo | 6 ++++-- util/RfSchema.cs | 28 +++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/notes/todo b/notes/todo index a6ede76..ff5828a 100644 --- a/notes/todo +++ b/notes/todo @@ -23,7 +23,7 @@ Put trials in their own tables not in regular customers processed timestamp status enum 0=notset, 1=approved, 2=rejected rejectreason text - KEY as generated text + KEY as generated text, null if nothing key fetched timestamp Add minimal barebones ui for this under main top menu beside customers "Trials" @@ -57,14 +57,16 @@ LICENSE TABLE LicenseView UI Add dbid as field readonly -KEYGEN +License UI modify with tabs for v8 and v7 version + just stub in basic with no options for now or whatever the absolute required will be for v8 the key is stored in the table same as v7 but with dbid and different format (obvs) route: rvfcontroller checks license table and trial table, looks for unfetched key checks license first for unfetched and matching dbid checks trial second for unfetched and matching dbid + checks revoke list?(future) diff --git a/util/RfSchema.cs b/util/RfSchema.cs index 86b346f..cbc1f75 100644 --- a/util/RfSchema.cs +++ b/util/RfSchema.cs @@ -13,7 +13,7 @@ namespace rockfishCore.Util ///////////////////////////////////////////////////////////////// /////////// CHANGE THIS ON NEW SCHEMA UPDATE //////////////////// - public const int DESIRED_SCHEMA_LEVEL = 15; + public const int DESIRED_SCHEMA_LEVEL = 16; ///////////////////////////////////////////////////////////////// @@ -359,6 +359,32 @@ namespace rockfishCore.Util setSchemaLevel(currentSchema); } + + ////////////////////////////////////////////////// + //schema 16 RAVEN stuff + if (currentSchema < 16) + { + // exec("CREATE TABLE trialrequest (" + + // "id INTEGER PRIMARY KEY, dtcreated integer not null, customerid integer not null, regto text not null, key text not null, code text not null, email text not null, " + + // "fetchfrom text, dtfetched integer, fetched boolean default 0 NOT NULL CHECK (fetched IN (0,1))" + + // ")"); + + exec("CREATE TABLE trialrequest (" + + "id INTEGER PRIMARY KEY, dbid text not null, companyname text not null, contactname text not null, notes text, email text not null, dtrequested integer, " + + "dtprocessed integer, status integer default 0 not null, rejectreason text, key text, dtfetched integer, fetched boolean default 0 NOT NULL CHECK (fetched IN (0,1))" + + ")"); + + exec("alter table site add legacyv7 boolean default 0 NOT NULL CHECK (fetched IN (0,1))"); + exec("alter table site add dbid text default 'v7_no_dbid' NOT NULL"); + exec("update site set legacyv7 = 1"); + + exec("alter table license add dbid text default 'v7_no_dbid' NOT NULL"); + + //add product codes for raven + + currentSchema = 16; + setSchemaLevel(currentSchema); + } //*************************************************************************************