Skip to content

Commit 93ef8b7

Browse files
authored
fix: only apply migrations if database is enabled (#343)
1 parent e0e493d commit 93ef8b7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/utils/build.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,12 @@ export function addBuildHooks(nuxt: Nuxt, hub: HubConfig) {
9696

9797
process.exit(1)
9898
})
99-
// Apply migrations
100-
const migrationsApplied = await applyRemoteMigrations(hub)
101-
if (!migrationsApplied) {
102-
process.exit(1)
99+
// Apply migrations if database is enabled
100+
if (hub.database) {
101+
const migrationsApplied = await applyRemoteMigrations(hub)
102+
if (!migrationsApplied) {
103+
process.exit(1)
104+
}
103105
}
104106
})
105107
})

0 commit comments

Comments
 (0)