Mitch Ames - 2019-07-27

... display a message box telling the user that it has detected an inconsistency and has deleted ...

Actually it should display a messagebox if it detects an inconsistency even if it does not make any change to the data. Any sort of inconsistency implies the risk of data loss, either previously (creating the inconsistency) or in the future. The sooner the user knows about the problem, the sooner the data can be recovered, and the more likely a useful bug report can be submitted.