Informations
What is the current behavior?
When I create field with unique constraint and then uncheck this checkbox the constraint still exists in the database and therefore it is still effectively unique field.
Steps to reproduce the problem
What is the expected behavior?
I should be able to create two entries with same value given that unique is unset
Suggested solutions
Hello @jskorepa , thank you for reporting this issue. We are currently on another feature and bug fix. Since time is lacking on our side, feel free investigate and submit a PR, we鈥檒l appreciate your contribution on this issue!
Check out the contributing guide to get started: https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md
Likely due to Strapi not modifying the collection, will need to be fixed in the mongoose package.
As a workaround, using MongoDB Compass you can navigate to the collection with the unwanted unique property, and under the indexes tab, you can drop the index in question.
When using the command line you can use dropIndex
Most helpful comment
As a workaround, using MongoDB Compass you can navigate to the collection with the unwanted unique property, and under the indexes tab, you can drop the index in question.
When using the command line you can use
dropIndex