From 4a5ccb623e4d85a2496c63d2e145b3151a2b0909 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Wed, 21 Aug 2024 11:59:52 +0200 Subject: [PATCH] Added a cersion bump of the DB schema to prevent failed downgrades. --- .../Database/Database schema/8. Encrypted fields.sql | 6 ++++++ .../Database/Database schema/Schema.sql | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 Duplicati.Library.RestAPI/Database/Database schema/8. Encrypted fields.sql diff --git a/Duplicati.Library.RestAPI/Database/Database schema/8. Encrypted fields.sql b/Duplicati.Library.RestAPI/Database/Database schema/8. Encrypted fields.sql new file mode 100644 index 000000000..61249c621 --- /dev/null +++ b/Duplicati.Library.RestAPI/Database/Database schema/8. Encrypted fields.sql @@ -0,0 +1,6 @@ +/* +This update does nothing but the user cannot really downgrade, +because the fields that are encrypted cannot be read by the previous version. +*/ +SELECT COUNT(*) FROM "Notification"; + diff --git a/Duplicati.Library.RestAPI/Database/Database schema/Schema.sql b/Duplicati.Library.RestAPI/Database/Database schema/Schema.sql index 5b692931d..75b024632 100644 --- a/Duplicati.Library.RestAPI/Database/Database schema/Schema.sql +++ b/Duplicati.Library.RestAPI/Database/Database schema/Schema.sql @@ -164,5 +164,5 @@ CREATE TABLE "TokenFamily" ( "LastUpdated" INTEGER NOT NULL ); -INSERT INTO "Version" ("Version") VALUES (7); +INSERT INTO "Version" ("Version") VALUES (8);