For example
Org ID | Email 123 | moshontong@gmail.com 123 | moshontong@gmail.com
Now this throws an error, 123 | moshontong@gmail.com is duplicate. But if this is the case
Org ID | Email 123 | moshontong@gmail.com 021 | moshontong@gmail.com
OR Org ID | Email 123 | moshontong@gmail.com 123 | joshontong@gmail.com
This is still a unique data since the ORg ID or the Email are not the same to other that
Is this your custom collection?
yes
If you want org Id to be unique, create a unique index on org Id. Same with email
so what if I have moshontong email on two document but the org ids is not the same does it still throws an error?
Since the org ids are different the unique constraint will not apply. Both documents will be regarded as distinct.
This only applies if you create 1 unique index with both attributes.
If you have 1 index on email, no 2 document can have the same email
Yes, I'm aware of that π
Recommended threads
- Export, Import or Migration giving this ...
As you can see in yhe screenshot i am not able to export any data or export the data from tables. Also it is affecting the migration from appwrite to appwrite h...
- I'm getting an error on the console "j?....
On my self hosted instance version 1.8.1 the console is giving me this error when trying to view the rows for a table I recently created. My application is read...
- Websites hosted on my appwrite sites hav...
Hello, all my websites hosted on appwrite sites are not running I am getting this message "This site canβt be reached drivehub.appwrite.network took too long t...