Skip to content

feat(db): add hub.db.applyMigrationsDuringDev: boolean option #836

@miguelrk

Description

@miguelrk

Is your feature request related to a problem? Please describe.
Currently running pnpm run dev:production (with production env vars) will attempt to apply migrations on production database. It already happened to me that I had a corrupt/incomplete migration file and it resulted in a partial migration which was very hard to undo/resolve in production database.

Describe the solution you'd like
The auto-migrate feature is fine, but nuxthub should at least provide a way to disable it for more control/safety. This could be exposed as a hub.db.applyMigrationsDuringDev: boolean option in nuxt.config.ts, analogous to the existing hub.db.applyMigrationsDuringBuild: boolean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions