From 3660d6c3c7ddacfb54d4a3bb42bc93467e7a75af Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 23 Mar 2018 09:16:21 +0100 Subject: [PATCH] Don't search migration version in old Applications table anymore --- server/initializers/migrator.ts | 14 +++----------- 1 file 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 () { let actualVersion: number = null - // Search in "Applications" or "application" tables - try { - const [ rows ] = await sequelizeTypescript.query('SELECT "migrationVersion" FROM "Applications"') - if (rows && rows[ 0 ] && rows[ 0 ].migrationVersion) { - actualVersion = rows[ 0 ].migrationVersion - } - } catch { - const [ rows ] = await sequelizeTypescript.query('SELECT "migrationVersion" FROM "application"') - if (rows && rows[0] && rows[0].migrationVersion) { - actualVersion = rows[0].migrationVersion - } + const [ rows ] = await sequelizeTypescript.query('SELECT "migrationVersion" FROM "application"') + if (rows && rows[0] && rows[0].migrationVersion) { + actualVersion = rows[0].migrationVersion } if (actualVersion === null) {