Merge pull request #1474 from hedgedoc/failing-migrations-notice

[1.x] Add help link and short explanation for failing migrations
This commit is contained in:
David Mehren 2021-08-01 18:22:37 +02:00 committed by GitHub
commit 84571ac0e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,7 +82,10 @@ db.runMigrations = async function runMigrations () {
// exit in case of unsuccessful migrations // exit in case of unsuccessful migrations
await umzug.up().catch(error => { await umzug.up().catch(error => {
logger.error(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) process.exit(1)
}) })
logger.info('All migrations performed successfully') logger.info('All migrations performed successfully')