Managed entity: creating custom fields with same label causes fatal error because of db index.
Overview
It seems a bit over the top to have fatal errors when custom field labels are not unique. This would (likely) only appear if someone had a managed entity for the custom field. Or if they were using the API directly.
Example use-case
- Create a custom group. Add a custom field.
- Go to API4, choose CustomField, create. Create a new custom field with the same label.
Current behaviour
DB Error: already exists
Proposed behaviour
Remove the index from the database for the label. The custom field index on the name should be enough. The UI will still have validation to prevent duplicate labels, but that's necessary because there's no way to specify the label and name separately in the UI.