Advanced data validation

All databases include a mechanism for validating input. In a SQL context, CHECK constraints allow you to specify a set of conditions a value must satisfy - for example, Column X should not be larger than Column Y. This section describes how to configure custom CHECK constraints.

You can already define the following constraints in the Prisma schema:

In this section

Edit this page on GitHub