store: tighten CHECK constraint on host_repo_stats.last_check_status

This commit is contained in:
2026-05-03 22:15:57 +01:00
parent f97f67eb67
commit 4ad0b5147a
2 changed files with 9 additions and 1 deletions
@@ -50,7 +50,7 @@ CREATE TABLE host_repo_stats (
unique_files INTEGER,
snapshot_count INTEGER,
last_check_at TEXT,
last_check_status TEXT, -- 'ok' | 'errors_found' | 'failed'
last_check_status TEXT CHECK (last_check_status IS NULL OR last_check_status IN ('ok', 'errors_found', 'failed')),
lock_present INTEGER NOT NULL DEFAULT 0,
last_prune_at TEXT,
last_prune_freed_bytes INTEGER,