This commit is contained in:
@@ -497,9 +497,14 @@ namespace AyaNova.Util
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
// Ensure the db is not modified
|
// Ensure the db is not modified
|
||||||
//
|
//
|
||||||
internal static async Task CheckFingerPrintAsync(long ExpectedColumns, long ExpectedIndexes,
|
internal static async Task CheckFingerPrintAsync(
|
||||||
long ExpectedCheckConstraints, long ExpectedForeignKeyConstraints,
|
long ExpectedColumns,
|
||||||
long ExpectedViews, long ExpectedRoutines, ILogger _log)
|
long ExpectedIndexes,
|
||||||
|
long ExpectedCheckConstraints,
|
||||||
|
long ExpectedForeignKeyConstraints,
|
||||||
|
long ExpectedViews,
|
||||||
|
long ExpectedRoutines,
|
||||||
|
ILogger _log)
|
||||||
{
|
{
|
||||||
_log.LogDebug("Checking DB integrity");
|
_log.LogDebug("Checking DB integrity");
|
||||||
|
|
||||||
@@ -665,12 +670,18 @@ namespace AyaNova.Util
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (ExpectedColumns != actualColumns || ExpectedIndexes != actualIndexes)
|
if (ExpectedColumns != actualColumns
|
||||||
|
|| ExpectedIndexes != actualIndexes
|
||||||
|
|| ExpectedCheckConstraints != actualCheckConstraints
|
||||||
|
|| ExpectedForeignKeyConstraints != actualForeignKeyConstraints
|
||||||
|
|| ExpectedRoutines != actualRoutines
|
||||||
|
|| ExpectedViews != actualViews)
|
||||||
{
|
{
|
||||||
var err = string.Format("E1030 - Database integrity check failed (C{0}I{1})", actualColumns, actualIndexes);
|
var err = $"E1030 - Database integrity check failed (C{actualColumns}:I{actualIndexes}:CC{actualCheckConstraints}:FC{actualForeignKeyConstraints}:R{actualRoutines}:V{actualViews})";
|
||||||
_log.LogCritical(err);
|
_log.LogCritical(err);
|
||||||
throw new ApplicationException(err);
|
throw new ApplicationException(err);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user