cannot insert after soft delete values in prisma ORM

Viewed 17

I just need an idea about this. I have created a table with a unique column named person_name. In this table I use prisma v2 soft delete method. In here just update the deleted column as true.

But when I try to insert the same person_name after a soft delete, it returns an error calling Unique constraint failed.

Can anybody give any idea to skip this issue. My requirement is to make person_name as a unique column. But when I delete the person_name I should be able to insert the same person_name again.

0 Answers
Related