build fixes.
This commit is contained in:
parent
cd300b0453
commit
5537f7b782
|
@ -358,11 +358,14 @@ async function performAppCreate(ctx: UserCtx<CreateAppRequest, App>) {
|
|||
await createApp(appId)
|
||||
}
|
||||
|
||||
// Initialise the app migration version as the latest one
|
||||
await appMigrations.updateAppMigrationMetadata({
|
||||
appId,
|
||||
version: appMigrations.getLatestEnabledMigrationId(),
|
||||
})
|
||||
const latestMigrationId = appMigrations.getLatestEnabledMigrationId()
|
||||
if (latestMigrationId) {
|
||||
// Initialise the app migration version as the latest one
|
||||
await appMigrations.updateAppMigrationMetadata({
|
||||
appId,
|
||||
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 New Issue