This commit is contained in:
2018-08-23 19:29:55 +00:00
parent 8c37148121
commit 1f88be9ee3
2 changed files with 20 additions and 9 deletions

View File

@@ -378,12 +378,12 @@ namespace AyaNova
lb.ValidateLocales();
#if (DEBUG)
// Util.DbUtil.DropAndRecreateDb(_log);
// AySchema.CheckAndUpdate(dbContext, _log);
// lb.ValidateLocales();
// AyaNova.Core.License.Initialize(apiServerState, dbContext, _log);
// AyaNova.Core.License.Fetch(apiServerState, dbContext, _log);
// Util.Seeder.SeedDatabase(dbContext, Util.Seeder.SeedLevel.SmallOneManShopTrialDataSet);
Util.DbUtil.DropAndRecreateDb(_log);
AySchema.CheckAndUpdate(dbContext, _log);
lb.ValidateLocales();
AyaNova.Core.License.Initialize(apiServerState, dbContext, _log);
AyaNova.Core.License.Fetch(apiServerState, dbContext, _log);
Util.Seeder.SeedDatabase(dbContext, Util.Seeder.SeedLevel.SmallOneManShopTrialDataSet);
#endif

View File

@@ -19,7 +19,7 @@ namespace AyaNova.Util
/////////////////////////////////////////////////////////////////
/////////// CHANGE THIS ON NEW SCHEMA UPDATE ////////////////////
private const int DESIRED_SCHEMA_LEVEL = 8;
private const int DESIRED_SCHEMA_LEVEL = 9;
internal const long EXPECTED_COLUMN_COUNT = 69;
internal const long EXPECTED_INDEX_COUNT = 14;
@@ -123,7 +123,16 @@ namespace AyaNova.Util
exec("CREATE UNIQUE INDEX localename_idx ON alocale (name)");
exec("CREATE TABLE alocaleitem (id BIGSERIAL PRIMARY KEY, localeid bigint not null REFERENCES alocale (id), key text not null, display text not null)");
exec("CREATE INDEX localeitemlid_key_idx ON alocaleitem (localeid,key)");
//create aevent biz event log table
exec("CREATE TABLE aevent (id BIGSERIAL PRIMARY KEY, created timestamp not null, ownerid bigint not null," +
"ayid bigint not null, aytype integer not null, ayevent integer not null, textra varchar(255))");
//TODO: do I *really* need these or do they bloat unnecessarily? Need to test with big dataset
//index for quick searching
// exec("CREATE INDEX ayid_idx ON aevent (ayid);");
// exec("CREATE INDEX aytype_idx ON aevent (aytype);");
//Prime the db with the default LOCALES
AyaNova.Biz.PrimeData.PrimeLocales(ct);
@@ -231,7 +240,9 @@ namespace AyaNova.Util
//////////////////////////////////////////////////
// FUTURE