Join Slack
Powered by
Are multi column unique constraints not supported ...
# orm-help
h
Halvor
07/30/2021, 3:35 PM
Are multi column unique constraints not supported by prisma on postgresql? Trying this on the table with no result when looking at it in pgAdmin.
Copy code
@@unique(fields: [arbitratedId, userId])
r
Ryan
08/02/2021, 5:28 AM
@Halvor
👋 Yes they are supported:
https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#unique-1
Ryan
08/03/2021, 12:07 PM
@Halvor
👋 Did this work?
h
Halvor
08/04/2021, 8:59 PM
Sorry for late answer, been busy. It did not hard fail, but i cannot see the unique constraint in pgAdmin either.
Open in Slack
Previous
Next