Open FleetAdmiralJakob opened 1 year ago
Maybe Drizzle (after the last video)
I think it would be a good thing to give an ORM select option where you could use either prisma or drizzle instead of fully switching.
The T3-Stack team has expressed a preference for avoiding the use of "bleeding edge" technologies. Consequently, while Drizzle represents an interesting potential upgrade, they advise waiting until it matures and reaches its first release (v1) before considering a switch. During this interim period, a viable solution might be to create a community-maintained package or branch dedicated to implementing all the latest features. This approach could allow us to take advantage of newer technologies on smaller projects, while maintaining stability and reliability in the primary branch.
The T3-Stack team has expressed a preference for avoiding the use of "bleeding edge" technologies. Consequently, while Drizzle represents an interesting potential upgrade, they advise waiting until it matures and reaches its first release (v1) before considering a switch. During this interim period, a viable solution might be to create a community-maintained package or branch dedicated to implementing all the latest features. This approach could allow us to take advantage of newer technologies on smaller projects, while maintaining stability and reliability in the primary branch.
Understandable, I was mainly in the boat of including the choice between prisma and ie drizzle when it's ready 👍
We're a bit blocked by https://github.com/nextauthjs/next-auth/pull/7443 but other than that #1461 & #1446 should address this
Awesome! Glad to hear. Haven't gotten around to use drizzle a whole lot myself yet but from what I've experienced in some smaller projects I got bothe the setup and perf is so much better than prisma.
I btw take it you've (@juliusmarminge) used drizzle already for quite some projects right? Do you know any equivilant of the MySql cuid (as entry id for a model entry) on drizzle? The way I converted a prisma project to drizzle myself is by just having a varchar id row but I could imagine this possibly creating some issues at some point.
I've mostly been using Kysely lately but there I do something like this:
genId
is an alias to nanoid
in this project but you can do cuid, uuid, ulid or whatever you want really
I've mostly been using Kysely lately but there I do something like this:
genId
is an alias tonanoid
in this project but you can do cuid, uuid, ulid or whatever you want really
Haven't used kysely yet. It's similar to drizzle right? (In the sense of it being a edge-ready prisma alternative)
And if so. In case it uses some form of a schema, what does this look like in this case when using a uuid as the primary key?
Just use a varchar with the size you need. For uuid this should be 36B.
If your db support uuid natively use that
Just use a varchar with the size you need. For uuid this should be 36B.
If your db support uuid natively use that
Gotcha, mainly been using the cuid binding in prisma in previous project but couldn't find a similar binding for the drizzle schema.
Gotcha, mainly been using the cuid binding in prisma in previous project but couldn't find a similar binding for the drizzle schema.
Then you've used a VARCHAR(191) which is quite a bit larger than you need:
Gotcha, mainly been using the cuid binding in prisma in previous project but couldn't find a similar binding for the drizzle schema.
Then you've used a VARCHAR(191) which is quite a bit larger than you need:
Gotcha🤙
We're a bit blocked by nextauthjs/next-auth#7443 but other than that #1461 & #1446 should address this
Is this really completed when nextauthjs/next-auth#7443 is still open?
Incidentally, I recently tried:
@auth/core
next-auth@experimental
@auth/drizzle-adapter
@planetscale/database
with create-next-app
and it worked on the Vercel edge runtime no problem.
https://github.com/nextauthjs/next-auth/pull/7443 just merged. Should be available now as v5.0.0-beta.0.
However, I agree. I think this issue should still be open until it is stable and t3 includes a dependency bump.
Since the T3 pages router is not using the fetch API and is for this reason not edge runtime ready I think this issue should stay open until this is also solved.
If you want I can also work on this.
Edge is no longer recommended by vercel
Edge is no longer recommended by vercel
But PPR isn't out yet
We'll still get it edge ready if you wanna deploy to workers or whatever other reason you have.
Just straight up listening and following everything Vercel says isnt the goal of this project so we definetely still want to make it edge ready.
But it do that we need next-auth v5 stable
Is your feature request related to a problem? Please describe.
I think it would be a great addition to the T3 stack if he gets edge ready.
Describe the solution you'd like to see
Dont rly know. Maybe switch the ORM.
EDIT: The pages router also needs to get switched to the Fetch API of tRPC
Describe alternate solutions
Additional information
No response