I want to have a check constraint to see if the value of a column in a table is in either one of the column of two tables. For example, value of Party in Payments table should either be in the ID column of Sellers table, or ID column of Purchasers table. Is there any way to enforce this in Prisma schema?
r
Ryan
09/16/2021, 10:42 AM
@Subho 👋
Not possible in the schema directly, but you can use Migrate to achieve this:
1. Create the migration using