From 93ef8b756f6d3a4537b17b09614715fc76a9c63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sat, 26 Oct 2024 10:21:05 +0200 Subject: [PATCH] fix: only apply migrations if database is enabled (#343) --- src/utils/build.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/utils/build.ts b/src/utils/build.ts index 9c56ab9c..8711ad27 100644 --- a/src/utils/build.ts +++ b/src/utils/build.ts @@ -96,10 +96,12 @@ export function addBuildHooks(nuxt: Nuxt, hub: HubConfig) { process.exit(1) }) - // Apply migrations - const migrationsApplied = await applyRemoteMigrations(hub) - if (!migrationsApplied) { - process.exit(1) + // Apply migrations if database is enabled + if (hub.database) { + const migrationsApplied = await applyRemoteMigrations(hub) + if (!migrationsApplied) { + process.exit(1) + } } }) })