aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrator.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-27 09:47:21 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:53 +0100
commit74bb2cb8348d6794ed3a0e2ec94c8c9abdde82cf (patch)
treefdbc4ed5894f95b0bbdaa83a7f4c3a1e45c75ff6 /server/initializers/migrator.ts
parentdf1966c9b48fd3cb3e0ec227bac97065d0122d78 (diff)
downloadPeerTube-74bb2cb8348d6794ed3a0e2ec94c8c9abdde82cf.tar.gz
PeerTube-74bb2cb8348d6794ed3a0e2ec94c8c9abdde82cf.tar.zst
PeerTube-74bb2cb8348d6794ed3a0e2ec94c8c9abdde82cf.zip
Add activitypub migration script
Diffstat (limited to 'server/initializers/migrator.ts')
-rw-r--r--server/initializers/migrator.ts7
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)