This commit is contained in:
2019-01-09 17:00:53 +00:00
parent 7627120bb6
commit 44a22c29a7
4 changed files with 21 additions and 29 deletions

View File

@@ -35,14 +35,14 @@ UI FEATURE - The ability to customize forms:
## TODO
- Need a FormCustom table and model to hold the user's form customization data
- Only holds items that differ from stock, no "core" fields allowed
- FormKey
- Like DataFilter, holds a JSON fragment in one field and the form key in another field
- JSON FRAGMENT holds items that differ from stock, no "core" fields allowed
- FieldKey
- Hide
- Required
- Type (checkbox, date, date time, decimal, number, picklist, and text)
- Need a FormAvailableFields static collection class that contains the fields available to each form
- #DONE# Need a FormAvailableFields static collection class that contains the fields available to each form
- This should be independent from any other class tied to a particular route or controller or db table as it could be some or none of all of those things
- Method: GetFields(FormKey): FieldKey (localekey), Hideable (bool), SharedLTKey (bool means it's not specific to that form), Custom (bool, means it's one of the custom fields that can be set to type etc)
- Method: GetForms() returns a list of form names

View File

@@ -380,7 +380,7 @@ namespace AyaNova
// ******************** TESTING WIPE DB *****************************
//
//Set this to true to wipe the db and reinstall a trial license and re-seed the data
var TESTING_REFRESH_DB = false;//#######################################################################################
var TESTING_REFRESH_DB = true;//#######################################################################################
#if (DEBUG)
//TESTING

View File

@@ -20,7 +20,7 @@ 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 = 9;
private const int DESIRED_SCHEMA_LEVEL = 10;
internal const long EXPECTED_COLUMN_COUNT = 98;
internal const long EXPECTED_INDEX_COUNT = 22;
@@ -240,26 +240,6 @@ namespace AyaNova.Util
}
// //////////////////////////////////////////////////
// //TAG tables
// if (currentSchema < 6)
// {
// LogUpdateMessage(log);
// // LOOKAT: Should taggroupmap have an index that enforces no taggroup can have the same tag more than once? Same for objects being tagged?
// exec("CREATE TABLE atag (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null)");
// //LOOKAT: isn't this useless without the ID? Need to see if it's being used after unit testing
// exec("CREATE UNIQUE INDEX atag_name_idx ON atag (name);");
// exec("CREATE TABLE atagmap (id BIGSERIAL PRIMARY KEY, ownerid bigint not null," +
// "tagid bigint not null REFERENCES atag (id), tagtoobjectid bigint not null, tagtoobjecttype integer not null)");
// //Taggroup
// exec("CREATE TABLE ataggroup (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, name varchar(255) not null)");
// exec("CREATE TABLE ataggroupmap (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, tagid bigint not null REFERENCES atag (id), taggroupid bigint not null)");
// setSchemaLevel(++currentSchema);
// }
//////////////////////////////////////////////////
@@ -317,6 +297,17 @@ namespace AyaNova.Util
//////////////////////////////////////////////////
//FORMCUSTOM table
if (currentSchema < 10)
{
LogUpdateMessage(log);
exec("CREATE TABLE aformcustom (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, " +
"formkey varchar(255) not null, template text, UNIQUE(formkey))");
setSchemaLevel(++currentSchema);
}
//MAKE SURE THE DESIRED SCHEMA WAS SET PROPERLY
if (currentSchema > DESIRED_SCHEMA_LEVEL)

View File

@@ -289,6 +289,7 @@ namespace AyaNova.Util
EraseTable("awidget", conn);
EraseTable("aevent", conn);
EraseTable("adatafilter", conn);
EraseTable("aformcustom", conn);
EraseTable("asearchkey", conn);
EraseTable("asearchdictionary", conn);
EraseTable("atag", conn);