backup: move appConfig to backups table

this is useful for clone also to copy notes, operators, checklist
of the time when the backup was made (as opposed to current)

at this point, it's not clear why we need a archives table. it's
an optimization to not have to store icon for every backup.
This commit is contained in:
Girish Ramakrishnan
2024-12-10 20:52:29 +01:00
parent 98058f600e
commit 41bc08a07e
14 changed files with 58 additions and 38 deletions
+1 -1
View File
@@ -156,6 +156,7 @@ CREATE TABLE IF NOT EXISTS backups(
manifestJson TEXT, /* to validate if the app can be installed in this version of box */
format VARCHAR(16) DEFAULT "tgz",
preserveSecs INTEGER DEFAULT 0,
appConfigJson TEXT, /* useful for clone and archive */
INDEX creationTime_index (creationTime),
PRIMARY KEY (id));
@@ -166,7 +167,6 @@ CREATE TABLE IF NOT EXISTS archives(
creationTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
appStoreIcon MEDIUMBLOB,
icon MEDIUMBLOB,
appConfigJson TEXT,
FOREIGN KEY(backupId) REFERENCES backups(id),
PRIMARY KEY (id));