aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-23 09:16:21 +0100
committerChocobozzz <me@florianbigard.com>2018-03-23 09:16:21 +0100
commit3660d6c3c7ddacfb54d4a3bb42bc93467e7a75af (patch)
tree2075fbca00bc5297eb1c7f478655cda971cf98dd /server/initializers
parentdce1d7957d6d843205030dbc4a712b79ec499b57 (diff)
downloadPeerTube-3660d6c3c7ddacfb54d4a3bb42bc93467e7a75af.tar.gz
PeerTube-3660d6c3c7ddacfb54d4a3bb42bc93467e7a75af.tar.zst
PeerTube-3660d6c3c7ddacfb54d4a3bb42bc93467e7a75af.zip
Don't search migration version in old Applications table anymore
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/migrator.ts14
1 files changed, 3 insertions, 11 deletions
diff --git a/server/initializers/migrator.ts b/server/initializers/migrator.ts
index 9ebc57f07..c767acc83 100644
--- a/server/initializers/migrator.ts
+++ b/server/initializers/migrator.ts
@@ -13,17 +13,9 @@ async function migrate () {
13 13
14 let actualVersion: number = null 14 let actualVersion: number = null
15 15
16 // Search in "Applications" or "application" tables 16 const [ rows ] = await sequelizeTypescript.query('SELECT "migrationVersion" FROM "application"')
17 try { 17 if (rows && rows[0] && rows[0].migrationVersion) {
18 const [ rows ] = await sequelizeTypescript.query('SELECT "migrationVersion" FROM "Applications"') 18 actualVersion = rows[0].migrationVersion
19 if (rows && rows[ 0 ] && rows[ 0 ].migrationVersion) {
20 actualVersion = rows[ 0 ].migrationVersion
21 }
22 } catch {
23 const [ rows ] = await sequelizeTypescript.query('SELECT "migrationVersion" FROM "application"')
24 if (rows && rows[0] && rows[0].migrationVersion) {
25 actualVersion = rows[0].migrationVersion
26 }
27 } 19 }
28 20
29 if (actualVersion === null) { 21 if (actualVersion === null) {