mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-24 07:21:09 -04:00
Merge branch 'master' into group-monitors
This commit is contained in:
commit
cef0a0faf4
58 changed files with 4845 additions and 1767 deletions
|
@ -69,6 +69,7 @@ class Database {
|
|||
"patch-ping-packet-size.sql": true,
|
||||
"patch-maintenance-table2.sql": true,
|
||||
"patch-add-gamedig-monitor.sql": true,
|
||||
"patch-add-google-analytics-status-page-tag.sql": true,
|
||||
"patch-add-parent-monitor.sql": true,
|
||||
};
|
||||
|
||||
|
@ -496,6 +497,16 @@ class Database {
|
|||
const shmPath = Database.path + "-shm";
|
||||
const walPath = Database.path + "-wal";
|
||||
|
||||
// Make sure we have a backup to restore before deleting old db
|
||||
if (
|
||||
!fs.existsSync(this.backupPath)
|
||||
&& !fs.existsSync(shmPath)
|
||||
&& !fs.existsSync(walPath)
|
||||
) {
|
||||
log.error("db", "Backup file not found! Leaving database in failed state.");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Delete patch failed db
|
||||
try {
|
||||
if (fs.existsSync(Database.path)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue