-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Suport for native types range
on Postgres
#3287
Comments
range
typerange
type
range
typerange
on Postgres
range
on Postgresrange
on Postgres
Hello @erawk,
General documentation on the native types preview feature can be found here: https://www.prisma.io/docs/concepts/components/preview-features/native-types Ranges are still not supported. The list of currently supported types is here: https://www.prisma.io/docs/concepts/components/preview-features/native-types/native-types-mappings With the introduction of You can find the documentation for |
Is there any update or plans on supporting |
++ |
This would be so beneficial. We are building an appointment system and having this would simplify the work that needs to be done by allowing postgres to do the "hard work". |
What does it take to implement a new type? Can anyone link a PR where this was done? |
@janpio Has this request made it into the backlogs of work at Prisma? Also, can you give us a lead on my previous question? Looking to know how this task might be done if someone has the ability to contribute. |
It is on our radar, but no concrete plans with an ETA. Generally types need to be implemented in our Prisma Schema Language, code can be found here as part of our Engines: https://github.com/prisma/prisma-engines/ We then need to be able to migrate, introspect, write and read fields of that type. Not something that is very easily to contribute without digging deep into how our Engines work. |
This seems pretty beneficial. I definitely want to make use of |
+++ |
This is a follow-up request to prisma/prisma-engines#71
Thanks for adding capability for native types given the database engine. I have a request for an additional type. I'm not sure where the best place for these requests are, do let me know if there's another venue for this.
As per prisma/prisma-engines#1004 (comment), a blocker for us to adopt Prisma is the lack of support for
Range
types inpostgres
. Specifically, the "timestamp with timezone range"tstzrange
: https://www.postgresql.org/docs/12/rangetypes.html#RANGETYPES-BUILTINCurrently, Prisma does not know how to handle this datatype and treats it as a
String
. When attempting to use themigration
system, itALTER
s the table, drops the column and creates a new column with the datatype ofString
. This results in dataloss and incorrect behaviour in our system.The text was updated successfully, but these errors were encountered: