-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong UUID column defenition in Drizzle schema after update to Prisma v5.18.0 #4
Comments
I've mitigated the issue for now (sql |
Thank you, it works now for v4. Yeah it is the open question on how to solve the v7 case. I guess Prisma generates v7 by itself without some PostgreSQL native function or stored procedure. I don't even know which variant is better, import a third party library, or leave a comment that uuid v7 generation should be handled by a user, or creating a stored procedure which would generate uuid v7 (if it is possible) |
Oh, one more thing, after generation of the Drizzle schema, |
Oh, can't believe I made that mistake. Patched in v0.1.6. |
Great, works now, I guess the issue can be closed |
I'll keep it open until I'm sure the defaults are handled properly, because it seems that my former sources of information on generator API and Prisma itself have misled me on some matters. |
With Prisma version v5.18.0 support of UUID v7 was added, so now you can specify the UUID version in Prisma Schema, it defaults to v4. The issue is that Drizzle schema is generated incorrectly with default UUID v4 option, the Prisma schema field looks like this:
Drizzle schema looks like this:
But should be like this:
Without
(4)
.About handling UUID v7 I have no idea how to resolve this.
The text was updated successfully, but these errors were encountered: