feat: execute durable syncthing route setup

This commit is contained in:
2026-07-23 02:27:17 +00:00
parent 4058b6d3c8
commit 10e803eaee
8 changed files with 1189 additions and 11 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ from pathlib import Path
from archive_clients.config import BackupConfig
from archive_clients.locking import DatabaseLease
from archive_clients.state import SCHEMA_VERSION
class BackupError(RuntimeError):
@@ -183,7 +184,7 @@ class SQLiteBackupManager:
if connection.execute("PRAGMA foreign_key_check").fetchall():
raise BackupError("SQLite foreign-key check failed")
version = connection.execute("PRAGMA user_version").fetchone()[0]
if version != 1:
if version != SCHEMA_VERSION:
raise BackupError(f"unsupported backup schema version {version}")
except sqlite3.Error as exc:
raise BackupError("backup is not a readable SQLite database") from exc