diff --git a/source/cdcdb/dblite.d b/source/cdcdb/dblite.d index 217652a..173627f 100644 --- a/source/cdcdb/dblite.d +++ b/source/cdcdb/dblite.d @@ -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) {