How to create two-way unique index or constraint
lets say I will have a matches table
in this case user retries to match swipedUser. It wont work.
but I want to avoid data insert if swipedUser tries to insert match with userId
I found this on stackoverflow but don't know how to implement this in drizzle
summary
if there is a data like this
userId: 1
swipedUserId: 2
and when to try insert
userId: 2
swipedUserId: 1
I should get error
0 Replies