aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
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) {