Skip to content

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

Closed
@cudba

Description

@cudba

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions