Open Jamess-Lucass opened 3 months ago
drizzle-orm
0.32.2
drizzle-kit
0.23.2
When wanting to override a nullable column, drizzle-zod does not respect when you completely override this with a zod type that is not nullable.
const userTable = pgTable("users", { name: text("name"), }); const userSchema = createInsertSchema(userTable, { name: z.string(), }); type UserSchema = TypeOf<typeof userSchema>; // type UserSchema = { // name?: string | null | undefined; // nullable, despite me overriding it with z.string() // }
I would expect UserSchema to result in
UserSchema
type UserSchema = { name: string }
drizzle-zod 0.5.1 drizzle-orm 0.32.2 drizzle-kit 0.23.2
UP. I can confirm this problem exists in the latest drizzle-zod.
still no update on this?
What version of
drizzle-orm
are you using?0.32.2
What version of
drizzle-kit
are you using?0.23.2
Describe the Bug
When wanting to override a nullable column, drizzle-zod does not respect when you completely override this with a zod type that is not nullable.
Expected behavior
I would expect
UserSchema
to result inEnvironment & setup
drizzle-zod 0.5.1 drizzle-orm 0.32.2 drizzle-kit 0.23.2