Drizzle-zod typeerror when passing in pgtable
I keep getting a type error when trying to get the zod schema from the pg schema with drizzle: public.ts contract.ts
10 Replies
The Type Error:
if any more information is required, feel free to ask
👋 I can't reproduce. Are you on latest versions for both drizzle-zod and drizzle-orm?
https://drizzle.run/k4lmz05tzibn4mesgb2t4ldu
Drizzle Run
LuukOriginal's playground - Drizzle Run
I tried updating my packages it and that seemed to have fixed the problem, thanks
I do still seem to have a small problem in my contract, it seems like the id (serial) and created_at (timestamp) turn into enums instead of their respective types, I assume this not the expected behavior right? gives:

@Raphaël M (@rphlmr) ⚡

schema and contract are still the same as the onces I sent before
versions are:
it seems to work fine on drizzle run tho I found out, also tried deleting all node_modules folders and reinstalling everything, but that didn't work either
also, the schema does work on the actual api, it does seem to be a problem with drizzle zod I guess?

the type of teams I am passing seems to be fine tho:

I can reproduce if I don't have:
in my tsconfig. It should fix your issue
Oh, that seemed to work, now I can finally continue on working on the application, thank you so much! 😁 👍