Closed ygreenb closed 9 months ago
In Prisma schema, I defined a field as a Json nullable type, but the generated result from Zod is not nullable.
schema.prisma
model User { bio Json? }
then run prisma migrate dev
prisma migrate dev
prisma/generated/zod/index.ts
export const UserSchema = z.object({ bio: JsonValueSchema, })
model User { bio Json }
export const UserSchema = z.object({ bio: JsonValueSchema.nullable(), })
No response
5.1.1
Bug description
In Prisma schema, I defined a field as a Json nullable type, but the generated result from Zod is not nullable.
How to reproduce
column is not nullable in prisma schema, but the generated type is not nullable
schema.prisma
then run
prisma migrate dev
prisma/generated/zod/index.ts
column is nullable in prisma schema, but the generated type is nullable
schema.prisma
then run
prisma migrate dev
prisma/generated/zod/index.ts
Expected behavior
No response
Prisma information
schema.prisma
Environment & setup
Prisma Version