Skip to content

feat(db): support drizzle orm v1 & relations v2#825

Open
Sqh3rd wants to merge 25 commits into
nuxt-hub:mainfrom
Sqh3rd:add-support-for-relations-v2
Open

feat(db): support drizzle orm v1 & relations v2#825
Sqh3rd wants to merge 25 commits into
nuxt-hub:mainfrom
Sqh3rd:add-support-for-relations-v2

Conversation

@Sqh3rd
Copy link
Copy Markdown

@Sqh3rd Sqh3rd commented Feb 9, 2026

Adds support for drizzle relations v2 introduced in drizzle v1-beta

Closes #764

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 9, 2026

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

A member of the Team first needs to authorize it.

@RihanArfan RihanArfan self-requested a review February 10, 2026 03:31
@branislavjuhaas
Copy link
Copy Markdown
Contributor

I love this concept!

@RihanArfan RihanArfan changed the title Add support for relations v2 feat(db): support drizzle orm v1 & relations v2 Feb 10, 2026
@Sqh3rd
Copy link
Copy Markdown
Author

Sqh3rd commented Feb 11, 2026

Just noticed that the type definition I added does not properly handle the case when there's multiple relationParts defined. I'll take a look today and tomorrow in order to fix that

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.

Thanks for this PR! 💚 Left one small comment, but otherwise looks great.

Comment thread playground/server/db/schema/author.postgresql.ts Outdated
@RihanArfan
Copy link
Copy Markdown
Member

Right now we're waiting for the Drizzle Team to add API support for Drizzle Studio MySQL and SQLite in v1.

Then we'll need to fix a bug with nuxt db squash now that there's no more journal, and document the requireddrizzle-kit up command for upgrading.

@Sqh3rd
Copy link
Copy Markdown
Author

Sqh3rd commented Feb 15, 2026

thanks a lot for your support! If you need/want any support from me please ping me, otherwise I'll mark this PR in my mind as "basically completed" 😄

@adamkasper
Copy link
Copy Markdown
Contributor

@RihanArfan hey, could you enable https://pkg.pr.new for this PR? :)

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 16, 2026

npm i https://pkg.pr.new/@nuxthub/core@825

commit: 55e4f03

@adamkasper
Copy link
Copy Markdown
Contributor

adamkasper commented May 10, 2026

Hey @Sqh3rd, just a heads up — Drizzle v1.0.0-rc.1 shipped a breaking change to the casing API (it's no longer set on the db instance but on the table/view/schema), so the casing option in the generated drizzle({...}) templates will need a rework before this can be merged. 🙂

Sqh3rd#1

@Sqh3rd
Copy link
Copy Markdown
Author

Sqh3rd commented May 12, 2026

Hey @Sqh3rd, just a heads up — Drizzle v1.0.0-rc.1 shipped a breaking change to the casing API (it's no longer set on the db instance but on the table/view/schema), so the casing option in the generated drizzle({...}) templates will need a rework before this can be merged. 🙂

Sqh3rd#1

Hey, thanks a lot for supporting @adamkasper. I'm starting to think that with the increases in template modification it may make more sense to use a templating engine (e.g. Mustache) to handle these things. Would it be fine to introduce sth like that? I'm not a 100% certain yet, whether that'd make it better. I'll try to write a poc in a few hours to get a feel for how that could look.

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.

drizzle v1 support

4 participants