Merge remote-tracking branch 'origin/master' into doubles-ss_master

# Conflicts:
#	server/database.js
This commit is contained in:
Louis Lam 2023-02-25 17:57:25 +08:00
commit f32d3af62c
92 changed files with 6623 additions and 1875 deletions

View file

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