This commit is contained in:
@@ -565,9 +565,10 @@ namespace Sockeye
|
||||
|
||||
if (ServerBootConfig.SOCKEYE_PERMANENTLY_ERASE_DATABASE)
|
||||
{
|
||||
_newLog.LogWarning("SOCKEYE_PERMANENTLY_ERASE_DATABASE has been set - deleting and recreating database");
|
||||
Util.DbUtil.DropAndRecreateDbAsync(_newLog).Wait();
|
||||
AySchema.CheckAndUpdateAsync(dbContext, _newLog).Wait();
|
||||
throw new InvalidOperationException("SOCKEYE_PERMANENTLY_ERASE_DATABASE has been set - Sockeye must be erased via psql to protect data from accidental deletion");
|
||||
// _newLog.LogWarning("SOCKEYE_PERMANENTLY_ERASE_DATABASE has been set - deleting and recreating database");
|
||||
// Util.DbUtil.DropAndRecreateDbAsync(_newLog).Wait();
|
||||
// AySchema.CheckAndUpdateAsync(dbContext, _newLog).Wait();
|
||||
}
|
||||
|
||||
|
||||
@@ -663,12 +664,12 @@ namespace Sockeye
|
||||
Console.WriteLine("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
|
||||
|
||||
|
||||
if (ServerBootConfig.SOCKEYE_PERMANENTLY_ERASE_DATABASE)
|
||||
{
|
||||
_newLog.LogWarning("SOCKEYE_PERMANENTLY_ERASE_DATABASE has been set - IMPORTING ROCKFISH");
|
||||
GlobalBizSettingsBiz.ImportRockfish(_newLog).Wait();
|
||||
_newLog.LogInformation("IMPORT COMPLETED");
|
||||
}
|
||||
// if (ServerBootConfig.SOCKEYE_PERMANENTLY_ERASE_DATABASE)
|
||||
// {
|
||||
// _newLog.LogWarning("SOCKEYE_PERMANENTLY_ERASE_DATABASE has been set - IMPORTING ROCKFISH");
|
||||
// GlobalBizSettingsBiz.ImportRockfish(_newLog).Wait();
|
||||
// _newLog.LogInformation("IMPORT COMPLETED");
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user