Skip to content

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

Merged
atinux merged 1 commit intonuxt-hub:mainfrom
miguelrk:main
Feb 13, 2026
Merged

feat(db): add hub.db.applyMigrationsDuringDev: boolean option#837
atinux merged 1 commit intonuxt-hub:mainfrom
miguelrk:main

Conversation

@miguelrk
Copy link
Copy Markdown
Contributor

@miguelrk miguelrk commented Feb 12, 2026

Closes #836

Summary of what was implemented (everything is analogous to existing applyMigrationsDuringBuild):

  1. Types
  • Added applyMigrationsDuringDev?: boolean to DatabaseConfig with JSDoc (@default true).
  • Added applyMigrationsDuringDev: boolean to ResolvedDatabaseConfig.
  1. Default
  • Set default applyMigrationsDuringDev: true in the defu config in resolveDatabaseConfig.
  1. Dev plugin
  • Added early return: if (!hub.db.applyMigrationsDuringDev) return so migrations are skipped when the option is false.
  1. Tests
  • Included applyMigrationsDuringDev: true in the default SQLite test.
  • Added “should respect custom applyMigrationsDuringDev” test for applyMigrationsDuringDev: false.
  • In the D1 test, asserted applyMigrationsDuringDev stays true (D1 does not force it to false).
  1. Docs
  • docs/content/docs/2.database/4.migrations.md: Extended the note to describe applyMigrationsDuringDev and showed both options in the example.
  • docs/content/docs/2.database/1.index.md: In the Docker/Kubernetes section, updated the intro and added applyMigrationsDuringDev: false to the SQLite, PostgreSQL, and MySQL examples.

All tests pass, and there are no linter errors.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 12, 2026

Someone is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@miguelrk miguelrk changed the title feat(db): add hub.db.applyMigrationsDuringDev: boolean option #836 feat(db): add hub.db.applyMigrationsDuringDev: boolean option Feb 12, 2026
@atinux atinux merged commit d51b136 into nuxt-hub:main Feb 13, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants