A unique constraint is a rule that ensures that all values in a column are different. For example, it is likely that you want user IDs and email addresses to be unique within a table.

This section describes how to configure unique constraints for different databases, and the effect of these constraints on the Prisma schema and generated client.

unique constraint illustration

In this section

Edit this page on GitHub