Skip to content

feat(cli): add "name" and "custom" arguments for db generate cli command#816

Merged
atinux merged 6 commits intonuxt-hub:mainfrom
branislavjuhaas:add-cli-generate-args
Feb 6, 2026
Merged

feat(cli): add "name" and "custom" arguments for db generate cli command#816
atinux merged 6 commits intonuxt-hub:mainfrom
branislavjuhaas:add-cli-generate-args

Conversation

@branislavjuhaas
Copy link
Copy Markdown
Contributor

This PR adds name and cusom flags support for nuxt db generate which under the hood uses drizzle-kit generate. It also updates docs to mention these new options and provides consistency fix for nuxt db mark-as-migrated command's name argument.

Why to add this?

  • name argument: When generating database migrations, it is a good practice to provide clear name describing the changes for better predictability of changes in devops environment. Providing option to do so is a good practice.
  • custom argument: There shall exist a way to generate empty sql migration file for more advanced database migrations. This is often necessary when installing postgres extensions, creating custom sql functions (e. g. immutable wrappers for extensions) or seeding the database.

Fixes #815

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 2, 2026

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

A member of the Team first needs to authorize it.

@branislavjuhaas branislavjuhaas changed the title Add "name" and "custom" arguments for db generate cli command feat(cli): add "name" and "custom" arguments for db generate cli command Feb 2, 2026
Copy link
Copy Markdown
Member

@RihanArfan RihanArfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR 💚

@atinux atinux merged commit b7bc108 into nuxt-hub:main Feb 6, 2026
1 of 3 checks passed
@branislavjuhaas branislavjuhaas deleted the add-cli-generate-args branch February 6, 2026 11:12
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.

Add option to provide name of migration and to add custom migration

4 participants