1
0
Fork 0

Don't search migration version in old Applications table anymore

This commit is contained in:
Chocobozzz 2018-03-23 09:16:21 +01:00
parent dce1d7957d
commit 3660d6c3c7
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -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) {