Error: A unique constraint would be violated on ProviderRoleAccess. Details: Field name = role
i am after run this command yarn prisma:deploy-force
5 Replies
Hello 👋
It's difficult to predict what might be going wrong without looking at the code. From the error message, it looks like you are trying to insert some data that is causing a unique constraint to fail. Have you defined unique constraint on the
role
column?colum role in db? or in seed?
Both. I assume you would have a column named
role
in the table of your database and you are seeding that table with role
data.this my file datamodel.graphql
i think i commented this code before: - ts-prisma/seed , and after # ts-prisma-node/seed , will it have an effect?