mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-02 11:36:27 -04:00
Finished knex_init_db.js
This commit is contained in:
parent
4056951915
commit
f2633a5d01
2 changed files with 153 additions and 8 deletions
|
@ -160,6 +160,8 @@ class Database {
|
|||
|
||||
let config = {};
|
||||
|
||||
log.info("db", `Database Type: ${dbConfig.type}`);
|
||||
|
||||
if (dbConfig.type === "sqlite") {
|
||||
|
||||
if (! fs.existsSync(Database.sqlitePath)) {
|
||||
|
@ -273,7 +275,7 @@ class Database {
|
|||
|
||||
let hasTable = await R.hasTable("docker_host");
|
||||
if (!hasTable) {
|
||||
const { createTables } = require("../db/kuma");
|
||||
const { createTables } = require("../db/knex_init_db");
|
||||
await createTables();
|
||||
} else {
|
||||
log.debug("db", "MariaDB database already exists");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue