backups: add per site enabledForUpdates flag

previously, we had a singleton 'main' flag to indicate a site can
be used for updates. with this new approach, we can get rid of the
'primary' concept. each site can be used for updates or not.
This commit is contained in:
Girish Ramakrishnan
2025-09-22 17:59:26 +02:00
parent 69d92ba0a8
commit 5157789774
11 changed files with 88 additions and 88 deletions

View File

@@ -316,7 +316,7 @@ CREATE TABLE IF NOT EXISTS backupSites(
format VARCHAR(16) NOT NULL,
schedule VARCHAR(128),
integrityKeyPairJson TEXT, // { publicKey, privateKey }
main BOOLEAN DEFAULT false, // 'primary' and 'default' are SQL keywords
enabledForUpdates BOOLEAN DEFAULT false,
creationTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,