mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-22 06:29:17 -04:00
Merge remote-tracking branch 'origin/master' into doubles-ss_master
# Conflicts: # server/database.js
This commit is contained in:
commit
f32d3af62c
92 changed files with 6623 additions and 1875 deletions
|
@ -70,6 +70,7 @@ class Database {
|
|||
"patch-maintenance-table2.sql": true,
|
||||
"patch-add-gamedig-monitor.sql": true,
|
||||
"patch-add-google-analytics-status-page-tag.sql": true,
|
||||
"patch-http-body-encoding.sql": true
|
||||
"patch-monitor-tls.sql": true,
|
||||
};
|
||||
|
||||
|
@ -497,6 +498,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