This commit is contained in:
@@ -353,6 +353,23 @@ namespace AyaNova
|
||||
app.UseMvc();
|
||||
|
||||
|
||||
|
||||
|
||||
// ******************************************************************
|
||||
// ******************** 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;
|
||||
|
||||
#if (DEBUG)
|
||||
//TESTING
|
||||
ServerBootConfig.AYANOVA_PERMANENTLY_ERASE_DATABASE = TESTING_REFRESH_DB;
|
||||
//TESTING
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
if (ServerBootConfig.AYANOVA_PERMANENTLY_ERASE_DATABASE)
|
||||
{
|
||||
_log.LogWarning("BOOT: AYANOVA_PERMANENTLY_ERASE_DATABASE is true, dropping and recreating database");
|
||||
@@ -377,21 +394,19 @@ namespace AyaNova
|
||||
LocaleBiz lb = new LocaleBiz(dbContext, 1, AuthorizationRoles.OpsAdminFull);
|
||||
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(Util.Seeder.SeedLevel.LargeCorporateMultiRegionalTrialDataSet);
|
||||
|
||||
//TESTING
|
||||
if (TESTING_REFRESH_DB)
|
||||
{
|
||||
AyaNova.Core.License.Fetch(apiServerState, dbContext, _log);
|
||||
Util.Seeder.SeedDatabase(Util.Seeder.SeedLevel.LargeCorporateMultiRegionalTrialDataSet);
|
||||
}
|
||||
//TESTING
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Open up the server for visitors
|
||||
apiServerState.SetOpen();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user