Add help link and short explanation for failing migrations

See #1419

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2021-07-21 00:05:35 +02:00
parent c9c170e6a7
commit 95a8b5c5be
No known key found for this signature in database
GPG key ID: DB99ADDDC5C0AF82

View file

@ -82,7 +82,10 @@ db.runMigrations = async function runMigrations () {
// exit in case of unsuccessful migrations
await umzug.up().catch(error => {
logger.error(error)
logger.error('Database migration failed. Exiting…')
logger.error(`Database migration failed.
This can be the result of upgrading from quite old versions and requires manual database intervention.
See https://docs.hedgedoc.org/guides/migration-troubleshooting/ for help.
Exiting`)
process.exit(1)
})
logger.info('All migrations performed successfully')