В список таблиц для проверки добавлена labels
This commit is contained in:
parent
c9623f87e8
commit
872e29cba1
1 changed files with 3 additions and 3 deletions
|
@ -104,7 +104,7 @@ private:
|
||||||
{
|
{
|
||||||
SqliteResult queryResult = sql(
|
SqliteResult queryResult = sql(
|
||||||
q{
|
q{
|
||||||
WITH required(name) AS (VALUES ("snapshots"), ("blobs"), ("snapshot_chunks"))
|
WITH required(name) AS (VALUES ("snapshots"), ("blobs"), ("snapshot_chunks"), ("labels"))
|
||||||
SELECT name AS missing_table
|
SELECT name AS missing_table
|
||||||
FROM required
|
FROM required
|
||||||
WHERE NOT EXISTS (
|
WHERE NOT EXISTS (
|
||||||
|
@ -122,11 +122,11 @@ private:
|
||||||
missingTables ~= row["missing_table"].to!string;
|
missingTables ~= row["missing_table"].to!string;
|
||||||
}
|
}
|
||||||
|
|
||||||
enforce(missingTables.length == 0 || missingTables.length == 3,
|
enforce(missingTables.length == 0 || missingTables.length == 4,
|
||||||
"Database is corrupted. Missing tables: " ~ missingTables.join(", ")
|
"Database is corrupted. Missing tables: " ~ missingTables.join(", ")
|
||||||
);
|
);
|
||||||
|
|
||||||
if (missingTables.length == 3)
|
if (missingTables.length == 4)
|
||||||
{
|
{
|
||||||
foreach (schemeQuery; _scheme)
|
foreach (schemeQuery; _scheme)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue