Add configurable history and storage retention policies

This commit is contained in:
2026-10-05 22:48:04 -04:00
parent 7c98df4fb0
commit 3952c4c938
37 changed files with 963 additions and 82 deletions
+10
View File
@@ -730,3 +730,13 @@ CREATE TABLE IF NOT EXISTS watchdog_actions (
cycle INTEGER NOT NULL DEFAULT 1,
UNIQUE(incident_id,cycle,action)
);
-- Explicit history holds and failure resolution never bypass dependency checks.
CREATE TABLE IF NOT EXISTS retention_controls (
category TEXT NOT NULL, record_id TEXT NOT NULL, protected INTEGER NOT NULL DEFAULT 0,
resolved_at TEXT, PRIMARY KEY(category,record_id)
);
CREATE TABLE IF NOT EXISTS retention_expirations (
category TEXT NOT NULL, record_id TEXT NOT NULL, expired_at TEXT NOT NULL,
PRIMARY KEY(category,record_id)
);