you could put a combined unique key on parent and user in the vote type (dont know if prisma supports this) - that would be the way i implement this in my database manually
a
Arnab
11/13/2018, 12:00 PM
That also implies that a user cannot vote on more than one video in addition to not being able to vote on the same video multiple times
f
fgreinus
11/13/2018, 12:10 PM
No it does not. Because the combination of the two columns makes the unique key