Skip to content

Commit

Permalink
fix: only apply migrations if database is enabled (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux authored Oct 26, 2024
1 parent e0e493d commit 93ef8b7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/utils/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
})
})
Expand Down

0 comments on commit 93ef8b7

Please sign in to comment.