aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrator.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/migrator.ts')
-rw-r--r--server/initializers/migrator.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/initializers/migrator.ts b/server/initializers/migrator.ts
index 29310b913..9ebc57f07 100644
--- a/server/initializers/migrator.ts
+++ b/server/initializers/migrator.ts
@@ -44,7 +44,7 @@ async function migrate () {
44 await executeMigration(actualVersion, migrationScript) 44 await executeMigration(actualVersion, migrationScript)
45 } catch (err) { 45 } catch (err) {
46 logger.error('Cannot execute migration %s.', migrationScript.version, err) 46 logger.error('Cannot execute migration %s.', migrationScript.version, err)
47 process.exit(0) 47 process.exit(-1)
48 } 48 }
49 } 49 }
50 50
@@ -92,7 +92,7 @@ async function executeMigration (actualVersion: number, entity: { version: strin
92 92
93 const migrationScript = require(path.join(__dirname, 'migrations', migrationScriptName)) 93 const migrationScript = require(path.join(__dirname, 'migrations', migrationScriptName))
94 94
95 await sequelizeTypescript.transaction(async t => { 95 return sequelizeTypescript.transaction(async t => {
96 const options = { 96 const options = {
97 transaction: t, 97 transaction: t,
98 queryInterface: sequelizeTypescript.getQueryInterface(), 98 queryInterface: sequelizeTypescript.getQueryInterface(),