|
|
@ -358,8 +358,14 @@ class Database {
|
|
|
|
directory: Database.knexMigrationsPath,
|
|
|
|
directory: Database.knexMigrationsPath,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
log.error("db", "Database migration failed");
|
|
|
|
// Allow missing patch files for downgrade or testing pr.
|
|
|
|
throw e;
|
|
|
|
if (e.message.includes("the following files are missing:")) {
|
|
|
|
|
|
|
|
log.warn("db", e.message);
|
|
|
|
|
|
|
|
log.warn("db", "Database migration failed, you may be downgrading Uptime Kuma.");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
log.error("db", "Database migration failed");
|
|
|
|
|
|
|
|
throw e;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|