I created a new field through the json file and set the unique option as ‘1’. I later realized it shouldn’t actually be a unique field and so I returned the value to ‘0’ but the field keeps throwing a ‘uniquevalidationerror’ anytime I try to create another document with the same value in that field
I’ve tried deleting the field completely and adding it back but it’s still the same! When I check from the UI (customize form), the ‘unique’ option is not checked yet the field still throws the validation error as though it is checked. It’s as though the ‘unique’ option is stuck in the db somewhere
Thanks for your response. I added through json file because it’s part of a pull request; when I tried adding from UI, it didn’t show up in the json file
I’ve tried running bench migrate after removing the field from the json file but when I added it again, the same issue came back!
Trust you’re doing great. Yes I did that or else the field wouldn’t have been re-created at all. I tried creating a unique field from the UI and then unchecking the ‘unique’ option afterwards (after creating at least one record with that field populated). The same issue occurs and it persists even if you delete all existing records containing that field
It looks like this is actually a bug. Could you pls confirm?
If table A has fields f1,f2,f3 and table B has fields f1,f2, and I copy json file (text) from table A to table B json file, then I run bench migrate. Will it change table B as same as table A?