PrismaP
Prisma2y ago
1 reply
Kova

Unique index with nullable composite key?

Is it possible to create a unique composite key where one of the keys is nullable? I have a table where the record is unique if the foreign key is null or has a value but I can't do that in an upsert without Prisma requiring all the keys to have a value.
Was this page helpful?