From 9c61247162f39d3dd762ff8c01479cde7f3415b7 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 4 Sep 2023 21:32:48 +0800 Subject: [PATCH] Fix #3679 --- server/setup-database.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/setup-database.js b/server/setup-database.js index 43f5c3c4..0c408365 100644 --- a/server/setup-database.js +++ b/server/setup-database.js @@ -46,9 +46,14 @@ class SetupDatabase { } catch (e) { log.info("setup-database", "db-config.json is not found or invalid: " + e.message); - // Check if kuma.db is found (1.X.X users) + // Check if kuma.db is found (1.X.X users), generate db-config.json if (fs.existsSync(path.join(Database.dataDir, "kuma.db"))) { this.needSetup = false; + + log.info("setup-database", "kuma.db is found, generate db-config.json"); + Database.writeDBConfig({ + type: "sqlite", + }); } else { this.needSetup = true; }