Add support for Indexes on Expressions #2504
Labels
kind/feature
A request for a new feature.
status/has-stopgap
A stopgap for this functionality has been implemented.
team/client
Issue for team Client.
team/psl-wg
team/schema
Issue for team Schema.
topic: database-functionality
topic: indexes
topic: introspection
topic: postgresql
topic: schema
Let's say I have the following index expression (which works for defining complex unique constraints) https://www.postgresql.org/docs/current/indexes-expressional.html
When generating the schema, there is no definition for this unique constraint.
findOne
method won't be able to target these fields in thewhere
obj.Index constraints are useful for more complex unique constraints on table columns, and it would be useful to let Prisma find this 'uniqueness' in table rows. Currently, a workaround is the
raw
function.The text was updated successfully, but these errors were encountered: