Unique constraints in Prisma

Viewed 102

What's the best way to model a unique rule in Prisma that matches below?

user can't add same data twice by a given field. other users can add this field.

I'm not sure I understand how @unique versus @@unique works or maybe I should be looking at something else entirely.

0 Answers
Related