From 7cf9a915f4112771cb054052e7e91aa774680afd Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 5 Dec 2023 15:37:45 +0100 Subject: [PATCH] Fix tests --- packages/server/src/appMigrations/appMigrationMetadata.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/appMigrations/appMigrationMetadata.ts b/packages/server/src/appMigrations/appMigrationMetadata.ts index b8db0e3c0e..202e78d964 100644 --- a/packages/server/src/appMigrations/appMigrationMetadata.ts +++ b/packages/server/src/appMigrations/appMigrationMetadata.ts @@ -25,6 +25,7 @@ export async function getAppMigrationVersion(appId: string): Promise { let metadata: AppMigrationDoc | undefined = await cache.get(cacheKey) + // We don't want to cache in dev, in order to be able to tweak it if (metadata && !env.isDev()) { return metadata.version } @@ -75,7 +76,7 @@ export async function updateAppMigrationMetadata({ const updatedMigrationDoc: AppMigrationDoc = { ...appMigrationDoc, - version, + version: version || "", history: { ...appMigrationDoc.history, [version]: { runAt: new Date().toISOString() },