Hi! Is it possible to set a unique index per user on one field? I could store another field with the user ID and create a unique index over both fields. But this is not so nice because in this case document security is enabled so the user is known anyway.
Sorry I'm not quite sure what you mean. What are you trying to do? Make sure no 2 documents have the same value?
Let's assume there is a collection "fruits". Every logged in user can deposit his favorite fruits. Each name of a fruit must be unique (apple, banana, pineapple). Therefore a unique index. But another user can also have "banana" as favorite fruit and should be able to enter it. Therefore I need a unique index for one column per user.
This should be possible with 1 unique index that has both the user id and fruit attributes
ok thanks
Recommended threads
- Unable to create records with other user...
are we able to create records in collections with permissions of different user than the caller of this request? (with document security on) I have backend func...
- New attribute stuck on processing?
I was running out of disk space and after creating an attribute and restarting my appwrite (self hosted) I have an attribute stuck on creation. Any way to remov...
- Bug: When creating a table, table name i...
I created a table with a typo. my_taable .... then my code couldn't find it. i updated table name and still couldn't find it. the table name doesn't update. i h...