My entire database occasionally has entries which are wrong, but instead of altering the data directly I'd like the ability to keep a revision of changes.
These changes occur very rarely.
Ideally something like this: -
(original table fields) | revision_version | origin | user | timestamp
So say I had a table called posts with the following schema: -
title | description | timestamp | author
An additional table called posts_revisions would be created thusly: -
title | description | timestamp | author | revision_version | origin | user | timestamp
- origin being the source of the change, be it a bot, user generated or what have you.
As you can imagine this is a rather large change to the existing database, my current concern is the performance hit of checking the _revisions tables for every query. Is this best practice for this sort of thing?