From 85e63ecea08949c57a09222833ce1ebc10c5e617 Mon Sep 17 00:00:00 2001
From: Benoit Lavenier <benoit.lavenier@e-is.pro>
Date: Mon, 5 Jun 2023 11:19:13 +0200
Subject: [PATCH] fix(dal) Fix wrong schema version

---
 app/lib/constants.ts             | 2 +-
 app/lib/dal/sqliteDAL/MetaDAL.ts | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/lib/constants.ts b/app/lib/constants.ts
index 243c2bf4d..02505d6a4 100644
--- a/app/lib/constants.ts
+++ b/app/lib/constants.ts
@@ -218,7 +218,7 @@ module.exports = {
 
   PEER: CommonConstants.PEER,
 
-  CURRENT_DB_VERSION: 27, // Should be set with 'max(keys(MetaDAL.migration)) + 1'
+  CURRENT_DB_VERSION: 28, // Should be set with 'max(keys(MetaDAL.migration)) + 1'
 
   NETWORK: {
     MAX_MEMBERS_TO_FORWARD_TO_FOR_SELF_DOCUMENTS: 10,
diff --git a/app/lib/dal/sqliteDAL/MetaDAL.ts b/app/lib/dal/sqliteDAL/MetaDAL.ts
index ba44074a2..53caf5519 100644
--- a/app/lib/dal/sqliteDAL/MetaDAL.ts
+++ b/app/lib/dal/sqliteDAL/MetaDAL.ts
@@ -195,9 +195,9 @@ export class MetaDAL extends AbstractSQLite<DBMeta> {
     25: async () => {},
 
     // Drop old table 'txs' (replaced by a file 'txs.db')
-    26: async () => {
-      await this.exec("BEGIN;" + "DROP TABLE IF EXISTS txs;" + "COMMIT;");
-    },
+    26: "BEGIN;" +
+        "DROP TABLE IF EXISTS txs;" +
+        "COMMIT;",
 
     // Add columns 'issuer' and 'recipient' in transaction table - see issue #1442
     27: async () => {
-- 
GitLab