Skip to content

Commit c68b818

Browse files
committed
Added meta for relations in suapbase zod types
1 parent bbfa4e7 commit c68b818

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/server/templates/zod.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,8 @@ const pgTypeToZodSchema = (
480480
if (dateLikeTypes.has(pgType)) {
481481
if (mode === 'list') {
482482
// Read shapes coerce to Date
483+
return 'z.coerce.date()'
484+
} else if (mode === 'insert_lenient') {
483485
return 'dateParser'
484486
} else {
485487
// Write shapes: only Date in, string out (ISO)

0 commit comments

Comments
 (0)