What is the proper way of storing a changelog, similar to git, for data in a database.
Currently, I have it set up so that every line in a table is given a unique string id that is used to determine where an edit occurs. When a user wants to change the value in column
juice from Apple to Orange, it logs the date, time, row id, column name, column initial value, column requested value, and some user information.
The request log looks something similar to this:
[Timestamp] [Username] [RowID] [Column] [CurrentValue] [RequestValue] [Reason] [Reviewed]
And the values look something like this:
[2016-04-27 12:00:00] [Jack] [JPMmaaevz] [juice] [Apple] [Orange] [I like oranges more] [false]
You can understand this feels a little messy. Is there a better way of handling change requests in a database?