Allow missing patch files for downgrade or testing pr.

pull/3515/head
Louis Lam 1 year ago
parent 33cc96f918
commit 2ef759a362

@ -358,10 +358,16 @@ class Database {
directory: Database.knexMigrationsPath, directory: Database.knexMigrationsPath,
}); });
} catch (e) { } catch (e) {
// Allow missing patch files for downgrade or testing pr.
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"); log.error("db", "Database migration failed");
throw e; throw e;
} }
} }
}
/** /**
* TODO * TODO

Loading…
Cancel
Save