Proposal: Don't allow deleting custom fields that are used in a smart group
I'm inspired by this SE question. I can't think of a reason why we'd allow someone to delete a custom field used in a smart group. The downside is we'd need to use an unindexed search on
civicrm_saved search (e.g.
LIKE %"custom_1"%) but I'm guessing that most folks don't have thousands of smart groups, and this would happen fairly infrequently.