This commit is contained in:
2023-02-21 23:15:23 +00:00
parent 27a43e5e38
commit 7d8bbb651d
7 changed files with 806 additions and 792 deletions

View File

@@ -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");
// }
}