I'm working on implementing a soft deletion system for Django models for one of my projects and I've run into a problem of new data conflicting with 'soft-deleted' data. Ideally I'd like to keep both the deleted and the new model, but also enforce unique constraints on existing models.
So essentially I'd like to be able to add fields that are unique unless deleted=True, at which point you can have as many as you'd like. Is there a way to do this that doesn't involve manually overriding the save function for each model I'd like to soft delete?