Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres TimestampTZ is generated without withTimezone:true #32

Open
Jaaneek opened this issue Feb 1, 2024 · 1 comment
Open

Postgres TimestampTZ is generated without withTimezone:true #32

Jaaneek opened this issue Feb 1, 2024 · 1 comment
Labels

Comments

@Jaaneek
Copy link

Jaaneek commented Feb 1, 2024

When we have timestampTZ from postgres we should add withTimezone true to the drizzle schema.
here is how it should look like:
image

Description of drizzle timestamps
image

Related tweet https://twitter.com/Jaaneek/status/1751655615271727251

@Jaaneek Jaaneek changed the title Postgres Timestampz is generated without withTimezone:true Postgres TimestampTZ is generated without withTimezone:true Feb 1, 2024
@farreldarian
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants