More subscription stuff

This commit is contained in:
2022-08-26 23:01:19 +00:00
parent c66a48b641
commit fa18b594ea
6 changed files with 35 additions and 21 deletions

View File

@@ -240,14 +240,14 @@ namespace AyaNova.Util
log.LogInformation("AyaNova database needs to be updated from schema version {0} to version {1}", currentSchema, DESIRED_SCHEMA_LEVEL);
//************* SCHEMA UPDATES ******************
bool PrimeEmptyDB = false;
//////////////////////////////////////////////////
// v8 initial release TABLES
//
if (currentSchema < 1)
{
LogUpdateMessage(log);
PrimeEmptyDB = true;
//create global biz settings table
await ExecQueryAsync("CREATE TABLE aglobalbizsettings (id INTEGER NOT NULL PRIMARY KEY, "
+ "webaddress TEXT, phone1 TEXT, phone2 TEXT, emailaddress TEXT, postaddress TEXT, postcity TEXT, postregion TEXT, postcountry TEXT, postcode TEXT, "
@@ -500,8 +500,8 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
+ "currencyname TEXT, hour12 BOOL NOT NULL, emailaddress TEXT, phone1 TEXT, phone2 TEXT, phone3 TEXT, mapurltemplate TEXT, uicolor VARCHAR(12) NOT NULL default '#ffffff')");
//Prime the db with the default SuperUser account
await AyaNova.Biz.PrimeData.PrimeSuperUserAccount(ct);
// //Prime the db with the default SuperUser account
// await AyaNova.Biz.PrimeData.PrimeSuperUserAccount(ct);
//Add user table
await ExecQueryAsync("CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, licenseagree BOOL NOT NULL, dbid TEXT, key TEXT NOT NULL)");
@@ -1599,7 +1599,15 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
log.LogInformation("Completed updating database schema to version {0}", currentSchema);
//*************************************************************************************
if (PrimeEmptyDB)
{
// //Load the default TRANSLATIONS
// await AyaNova.Biz.PrimeData.PrimeTranslations();
//Prime the db with the default SuperUser account
await AyaNova.Biz.PrimeData.PrimeSuperUserAccount(ct);
}
}//eofunction