diff options
Diffstat (limited to 'server/initializers/migrator.ts')
-rw-r--r-- | server/initializers/migrator.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/initializers/migrator.ts b/server/initializers/migrator.ts index 4fbe1cf5b..187c9be6e 100644 --- a/server/initializers/migrator.ts +++ b/server/initializers/migrator.ts | |||
@@ -26,7 +26,12 @@ async function migrate () { | |||
26 | const migrationScripts = await getMigrationScripts() | 26 | const migrationScripts = await getMigrationScripts() |
27 | 27 | ||
28 | for (const migrationScript of migrationScripts) { | 28 | for (const migrationScript of migrationScripts) { |
29 | await executeMigration(actualVersion, migrationScript) | 29 | try { |
30 | await executeMigration(actualVersion, migrationScript) | ||
31 | } catch (err) { | ||
32 | logger.error('Cannot execute migration %s.', migrationScript.version, err) | ||
33 | process.exit(0) | ||
34 | } | ||
30 | } | 35 | } |
31 | 36 | ||
32 | logger.info('Migrations finished. New migration version schema: %s', LAST_MIGRATION_VERSION) | 37 | logger.info('Migrations finished. New migration version schema: %s', LAST_MIGRATION_VERSION) |