Don't search migration version in old Applications table anymore
This commit is contained in:
parent
dce1d7957d
commit
3660d6c3c7
1 changed files with 3 additions and 11 deletions
|
@ -13,17 +13,9 @@ async function migrate () {
|
||||||
|
|
||||||
let actualVersion: number = null
|
let actualVersion: number = null
|
||||||
|
|
||||||
// Search in "Applications" or "application" tables
|
const [ rows ] = await sequelizeTypescript.query('SELECT "migrationVersion" FROM "application"')
|
||||||
try {
|
if (rows && rows[0] && rows[0].migrationVersion) {
|
||||||
const [ rows ] = await sequelizeTypescript.query('SELECT "migrationVersion" FROM "Applications"')
|
actualVersion = rows[0].migrationVersion
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actualVersion === null) {
|
if (actualVersion === null) {
|
||||||
|
|
Loading…
Reference in a new issue