integrity: add integrity check fields and initial UI

This commit is contained in:
Girish Ramakrishnan
2026-02-08 11:17:27 +01:00
parent 6303602323
commit 5276321ade
13 changed files with 232 additions and 50 deletions
+6 -1
View File
@@ -62,7 +62,7 @@ CREATE TABLE IF NOT EXISTS tokens(
scopeJson TEXT,
expires BIGINT NOT NULL, // FIXME: make this a timestamp
lastUsedTime TIMESTAMP NULL,
allowedIpRanges TEXT NULL,
allowedIpRanges TEXT,
PRIMARY KEY(accessToken));
CREATE TABLE IF NOT EXISTS apps(
@@ -162,8 +162,13 @@ CREATE TABLE IF NOT EXISTS backups(
siteId VARCHAR(128) NOT NULL,
integrityJson TEXT, /* { signature } */
statsJson TEXT,
integrityCheckTaskId INTEGER, /* task id while integrity check is running */
lastIntegrityCheckTime TIMESTAMP NULL, /* compared to task time, this is the result time */
integrityCheckStatus VARCHAR(16) NULL, /* 'passed' | 'failed' */
integrityCheckResultJson TEXT, /* per backup result. if stored in tasks, this would have to be aggregated */
FOREIGN KEY(siteId) REFERENCES backupSites(id),
FOREIGN KEY(integrityCheckTaskId) REFERENCES tasks(id),
INDEX creationTime_index (creationTime),
PRIMARY KEY (id));