Skip to content

[Feature Request] Allow Unsupported field types in @@index #1870

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

Closed
cudba opened this issue Nov 18, 2024 · 1 comment
Closed

[Feature Request] Allow Unsupported field types in @@index #1870

cudba opened this issue Nov 18, 2024 · 1 comment
Milestone

Comments

@cudba
Copy link

cudba commented Nov 18, 2024

I'm working with the postgis extension and want to add an index to a geometry like this

model Polygon {
    ...
    geometry    Unsupported("geometry(MultiPolygon, 4326)")

    @@index([geometry], name: "parcel_polygon_idx", type: Gist)
}

This works in the regular prisma schema, but in the model.zschema I get the following error

Field of "Unsupported" type cannot be used in expressions

Now I have to add this @@index manually into the prisma file each time I generate it which is not ideal obviously.

@ymc9
Copy link
Member

ymc9 commented Dec 5, 2024

fixed in 2.10.0

@ymc9 ymc9 closed this as completed Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants