mirror of
https://github.com/araxiaonline/WoWDBDefs.git
synced 2026-06-13 03:32:22 -04:00
Add check for impossible noninline relation arrays
This commit is contained in:
@@ -91,6 +91,20 @@ namespace DBDefsTest
|
||||
Console.ResetColor();
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var versionDefinition in definition.Value.versionDefinitions)
|
||||
{
|
||||
foreach (var column in versionDefinition.definitions)
|
||||
{
|
||||
if (column.isRelation && column.isNonInline && column.arrLength > 1)
|
||||
{
|
||||
errorEncountered.Add(definition.Key);
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine(definition.Key + "." + column.name + " is a non-inline relation with an array length greater than 1 (" + column.arrLength + ")!");
|
||||
Console.ResetColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("Checked " + foreignKeys + " foreign keys!");
|
||||
@@ -179,6 +193,7 @@ namespace DBDefsTest
|
||||
Console.WriteLine("There have been errors in the following DBDs:");
|
||||
foreach (var dbName in errorEncountered)
|
||||
Console.WriteLine(" - " + dbName);
|
||||
Console.ResetColor();
|
||||
Environment.Exit(1);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user