I'm tasked to fix a frontend system for approving/disapproving database updates, it's made in PHP and Postgres as it's Database.
The system goes like this:
The user updates his currently existing db entry using the system, the changes are applied to the db entry and flagged it's status to "Modified". Approving that entry won't be a problem 'cause when the admin approves that request the system will flag that entry as "Approved". The problem is the disapproval of that update, the new changes must be deleted and must revert back to the old entry, but that's not possible 'cause the original entry has already been modified.
How do I go about this? I thought of backing up the original entry to be updated and restore it to the database only if the admin disapproves the new changes. But this means creating another set of tables to the database just for that backup ... I wonder if there's a better way?
Here's a small diagram of my idea...:
http://img57.photobucket.com/albums/...disapprove.png