Add encryptionVersion to backups

this will identify the old style backups and warn user that a restore
doesn't work anymore
This commit is contained in:
Girish Ramakrishnan
2020-05-13 22:09:33 -07:00
parent 66fd713d12
commit f417a49b34
8 changed files with 66 additions and 8 deletions

View File

@@ -121,7 +121,8 @@ CREATE TABLE IF NOT EXISTS appEnvVars(
CREATE TABLE IF NOT EXISTS backups(
id VARCHAR(128) NOT NULL,
creationTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
version VARCHAR(128) NOT NULL, /* app version or box version */
packageVersion VARCHAR(128) NOT NULL, /* app version or box version */
encryptionVersion INTEGER, /* when null, unencrypted backup */
type VARCHAR(16) NOT NULL, /* 'box' or 'app' */
dependsOn TEXT, /* comma separate list of objects this backup depends on */
state VARCHAR(16) NOT NULL,