Closed ygreenb closed 1 month ago
Describe the bug In Prisma schema, I defined a field as a Json nullable type, but the generated result from Zod is not nullable.
Screenshots
schema.prisma
model User { name String? bio Json? }
then run prisma migrate dev
prisma migrate dev
prisma/generated/zod/index.ts
export const UserSchema = z.object({ name: z.string().nullable(), bio: JsonValueSchema, })
model User { name String bio Json }
export const UserSchema = z.object({ name: z.string(), bio: JsonValueSchema.nullable(), })
Package versions (please complete the following information):
Additional context Add any other context about the problem here.
Describe the bug In Prisma schema, I defined a field as a Json nullable type, but the generated result from Zod is not nullable.
Screenshots
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
Package versions (please complete the following information):
Additional context Add any other context about the problem here.