Issues with timestamp precision with postgres

Hi, I posted the other day about a bug with the date, but it seems this issue runs deeper.

https://discord.com/channels/1043890932593987624/1043890932593987627/1136224592764080268

I am also using timestamp which has a similar issue, when using mode string drizzle is returning a Date instance (conflicting with the generated types)

To make matters worse, when using mode: 'date' we lose all millisecond precision

This is the column I am defining

createdAt: timestamp('created_at', { mode: 'string', precision: 3 }).defaultNow().notNull();


This maintains the precision, but then the types are incorrect.

Has anyone faced this issue? Is this is a bug in drizzle?
Was this page helpful?