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)
|
await createApp(appId)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialise the app migration version as the latest one
|
const latestMigrationId = appMigrations.getLatestEnabledMigrationId()
|
||||||
await appMigrations.updateAppMigrationMetadata({
|
if (latestMigrationId) {
|
||||||
appId,
|
// Initialise the app migration version as the latest one
|
||||||
version: appMigrations.getLatestEnabledMigrationId(),
|
await appMigrations.updateAppMigrationMetadata({
|
||||||
})
|
appId,
|
||||||
|
version: latestMigrationId,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
await cache.app.invalidateAppMetadata(appId, newApplication)
|
await cache.app.invalidateAppMetadata(appId, newApplication)
|
||||||
return newApplication
|
return newApplication
|
||||||
|
|
|
@ -27,7 +27,9 @@ export async function getMigrationStatus(ctx: Ctx) {
|
||||||
|
|
||||||
const latestAppliedMigration = await getAppMigrationVersion(appId)
|
const latestAppliedMigration = await getAppMigrationVersion(appId)
|
||||||
|
|
||||||
const migrated = latestAppliedMigration >= getLatestEnabledMigrationId()
|
const latestMigrationId = getLatestEnabledMigrationId()
|
||||||
|
const migrated =
|
||||||
|
!latestMigrationId || latestAppliedMigration >= latestMigrationId
|
||||||
|
|
||||||
ctx.body = { migrated }
|
ctx.body = { migrated }
|
||||||
ctx.status = 200
|
ctx.status = 200
|
||||||
|
|
Loading…
Reference in a new issue