-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Bug?]: Prisma Model with Bytes field fails SDL generation in Service Test template #9773
Comments
Is there a workaround recommended or do I just serialize this as a String? |
The original issue description says "Setup a Postgres datasource (needed for Bytes type)", but I think this applies to Sqlite too. The Bytes type is supported across all engines: https://www.prisma.io/docs/orm/reference/prisma-schema-reference#bytes (Might be worth noting that when the linked issue, #5841, was created back in 2022 Prisma's docs said Bytes was unsupported for sqlite, so maybe that's where this comes from) I still need to test with sqlite too though, so I'm not 100% sure where RW's support stands yet as regards to Bytes in Sqlite. |
What's not working?
Given the following Prisma schema for a Postgres datasource:
after migrating, when generating the sdl:
The command fails:
Likely due to use of replace in
transformValue
of thepackages/cli/src/commands/generate/service/templates/test.ts.template
file:Also, interestingly:
yarn rw g sdl Key --no-tests
Still attempts to generate the test file for the service and gives same error.
How do we reproduce the bug?
See error when attempting the create the service test template.
Related Issues
See also #5841
What's your environment? (If it applies)
No response
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: