mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-18 12:14:41 -05:00
Fix #3679
This commit is contained in:
parent
ed04008569
commit
9c61247162
@ -46,9 +46,14 @@ class SetupDatabase {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.info("setup-database", "db-config.json is not found or invalid: " + e.message);
|
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"))) {
|
if (fs.existsSync(path.join(Database.dataDir, "kuma.db"))) {
|
||||||
this.needSetup = false;
|
this.needSetup = false;
|
||||||
|
|
||||||
|
log.info("setup-database", "kuma.db is found, generate db-config.json");
|
||||||
|
Database.writeDBConfig({
|
||||||
|
type: "sqlite",
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.needSetup = true;
|
this.needSetup = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user