Implementation proposal:
- Add an "UndoHistory" database table with columns: ActionID, ChangeDate, FileKey, FieldID, PreviousValue (add more if needed)
- On all DB writes, add an entry to that table with the previous value that is about to be overwritten
- Add an option for "Days to track undo history: 30" (or alternatively, number of entries/max size)
- periodically trim the undo database, deleting entries older than that
- add UI elements to allow Undo/CTRL+Z/Retrieving any old entry in the History
This may have performance impact for huge changes (like changing thousands of entries in one go), but otherwise should be OK.
Some tables/fields should not be covered, like for instance the TV programming guide, and calculated fields.
ActionID groups many changes into one logical operation; changing 100 records is one action, and can be undone in 1 step if desired.