appwrite icon indicating copy to clipboard operation
appwrite copied to clipboard

🚀 Feature: unique constraint on multiple attributes

Open pierroo opened this issue 1 year ago • 0 comments

🔖 Feature description

As of now we can only check "unique" on a single attribute at a time.

But there are many use cases where we have to make sure two attributes are unique "together"

🎤 Pitch

For example, a chatting app, I wanna make sure I cannot create twice the same "conversation". A 1:1 conversation having attributes "from_id" (my user id) and "friend_id" for example.

Instead of having to do first a query to make sure it doesn't exist yet, I would like the insert to be rejected by the database itself if the duo "from_id"/"friend_id" already exists

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

pierroo avatar Mar 12 '24 16:03 pierroo