aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrator.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-10 17:18:12 +0100
committerChocobozzz <me@florianbigard.com>2018-01-10 17:19:14 +0100
commit2ccaeeb341ffe8c2609039bf4c6d8835b4650316 (patch)
treea6bf6e05e7f02bc315e872d67a0b61ad6ad3d777 /server/initializers/migrator.ts
parent759f8a29e95932023564ca98dcbc90d1acb92da0 (diff)
downloadPeerTube-2ccaeeb341ffe8c2609039bf4c6d8835b4650316.tar.gz
PeerTube-2ccaeeb341ffe8c2609039bf4c6d8835b4650316.tar.zst
PeerTube-2ccaeeb341ffe8c2609039bf4c6d8835b4650316.zip
Fetch remote AP objects
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(),