You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
Jaaneek
changed the title
Postgres Timestampz is generated without withTimezone:true
Postgres TimestampTZ is generated without withTimezone:true
Feb 1, 2024
Prisma, by default, doesn't include timezone data for DateTime fields unless you use the @db modifier. Automatically enabling withTimezone might lead to unexpected behaviors for users not using this modifier.
Although it could be conditionally generated only for ones with @db.timestamptz, Prisma's DMMF helper doesn't give any information regarding the use of modifiers. I'm seeking a workaround for this limitation.
When we have timestampTZ from postgres we should add withTimezone true to the drizzle schema.
![image](https://private-user-images.githubusercontent.com/25470423/301499836-2c6261ac-76f1-4fac-822c-21f9a194e6b9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc3MTU1MTksIm5iZiI6MTcxNzcxNTIxOSwicGF0aCI6Ii8yNTQ3MDQyMy8zMDE0OTk4MzYtMmM2MjYxYWMtNzZmMS00ZmFjLTgyMmMtMjFmOWExOTRlNmI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjA2VDIzMDY1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE5NWY5MzQ5ZjE5MTAyMWY0NTQ2OTlmYTNiMDczNjRmNDMyMWU0MjI3ODEyYzQxOWU4NTZlYjBkZTg5ZmFhZDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YOvSc-fcWuXz9kbVPjdlbbRPSZ6i6tOaZ57Gz4K3L-I)
here is how it should look like:
Description of drizzle timestamps
![image](https://private-user-images.githubusercontent.com/25470423/301499968-14f46e31-baba-44b8-8513-addb0f4ade71.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc3MTU1MTksIm5iZiI6MTcxNzcxNTIxOSwicGF0aCI6Ii8yNTQ3MDQyMy8zMDE0OTk5NjgtMTRmNDZlMzEtYmFiYS00NGI4LTg1MTMtYWRkYjBmNGFkZTcxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjA2VDIzMDY1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVhZGY1YTFlMTBjZGM2Y2Q4NmVmNjUyZTBkNjJhNTMzNWEwY2ZmNTY0NmJiOTM1ZTVmYzBiMmFhZGFlZWY2MTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.509iex2EYq7leylQhuWE6KPgORMybqNQ0DlA2OROb88)
Related tweet https://twitter.com/Jaaneek/status/1751655615271727251
The text was updated successfully, but these errors were encountered: