Psql Array of text and `createSelectSchema`, `createInsertSchema`
It seems that
drizzle-zod
- createInsertSchema
and createSelectSchema
cannot infer correctly an array of text.
My column;
Indeed, the type of the corresponding column of createSelectSchema
or createInsertSchema
results as z.ZodString
instead of z.ZodArray<z.ZodString>
.
My workaround is to overwrite the inferred string of the corresponding column with an augment
from zod.
Any idea?4 Replies
Thanks !!!
whom did you thanked?
I was thanking in advance @ByteBender 😂😂🙏
your thank wasted
btw did you find any solution?
I am thinking to join(',') and split(',') every time