Handle no migrations
This commit is contained in:
parent
9ebe93f71d
commit
f77b812679
|
@ -135,9 +135,14 @@ const requiresMigration = async (ctx: Ctx) => {
|
|||
ctx.throw("AppId could not be found")
|
||||
}
|
||||
|
||||
const latestAppliedMigration = await getAppMigrationVersion(appId)
|
||||
const latestMigration = getLatestMigrationId()
|
||||
if (!latestMigration) {
|
||||
return false
|
||||
}
|
||||
|
||||
const requiresMigrations = latestAppliedMigration !== getLatestMigrationId()
|
||||
const latestMigrationApplied = await getAppMigrationVersion(appId)
|
||||
|
||||
const requiresMigrations = latestMigrationApplied !== latestMigration
|
||||
return requiresMigrations
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue