В список таблиц для проверки добавлена labels

This commit is contained in:
Alexander Zhirov 2025-09-15 10:59:30 +03:00
parent c9623f87e8
commit 872e29cba1
Signed by: alexander
GPG key ID: C8D8BE544A27C511

View file

@ -104,7 +104,7 @@ private:
{
SqliteResult queryResult = sql(
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
FROM required
WHERE NOT EXISTS (
@ -122,11 +122,11 @@ private:
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(", ")
);
if (missingTables.length == 3)
if (missingTables.length == 4)
{
foreach (schemeQuery; _scheme)
{