Merge branch 'master' into group-monitors

This commit is contained in:
Peace 2023-02-16 21:38:53 +01:00 committed by GitHub
commit cef0a0faf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 4845 additions and 1767 deletions

View file

@ -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)) {