From: Chocobozzz Date: Fri, 23 Mar 2018 08:16:21 +0000 (+0100) Subject: Don't search migration version in old Applications table anymore X-Git-Tag: v1.0.0-beta.2~53 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3660d6c3c7ddacfb54d4a3bb42bc93467e7a75af;p=oweals%2Fpeertube.git Don't search migration version in old Applications table anymore --- 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) {