build fixes.
This commit is contained in:
parent
cd300b0453
commit
5537f7b782
2 changed files with 11 additions and 6 deletions
|
@ -358,11 +358,14 @@ async function performAppCreate(ctx: UserCtx<CreateAppRequest, App>) {
|
|||
await createApp(appId)
|
||||
}
|
||||
|
||||
const latestMigrationId = appMigrations.getLatestEnabledMigrationId()
|
||||
if (latestMigrationId) {
|
||||
// Initialise the app migration version as the latest one
|
||||
await appMigrations.updateAppMigrationMetadata({
|
||||
appId,
|
||||
version: appMigrations.getLatestEnabledMigrationId(),
|
||||
version: latestMigrationId,
|
||||
})
|
||||
}
|
||||
|
||||
await cache.app.invalidateAppMetadata(appId, newApplication)
|
||||
return newApplication
|
||||
|
|
|
@ -27,7 +27,9 @@ export async function getMigrationStatus(ctx: Ctx) {
|
|||
|
||||
const latestAppliedMigration = await getAppMigrationVersion(appId)
|
||||
|
||||
const migrated = latestAppliedMigration >= getLatestEnabledMigrationId()
|
||||
const latestMigrationId = getLatestEnabledMigrationId()
|
||||
const migrated =
|
||||
!latestMigrationId || latestAppliedMigration >= latestMigrationId
|
||||
|
||||
ctx.body = { migrated }
|
||||
ctx.status = 200
|
||||
|
|
Loading…
Reference in a new issue