I have come across a requirement where we need to maintain a table where all the edit information needs to be shown. The requirement is as follows:
When someone edits anything in a Request form (has 9 inputs fields which can be edited), a new “Edit Log” read-only table should appear.
Columns in the Table should include:
Input Field Name that was changed
Initial Input Data (Data provided when creating a request first time)
Input Data that was provided during the edit (Current)
Date and Time of Edit
Name of the Editor
Status of the Request at the time of the Edit (Can be Pending, Approved, etc.)
It should look something similar to this:
Your open inputs are invited for handling this in database (how can we maintain this log in DB) and showing in Sail UI.
Thanks in advance
Discussion posts and replies are publicly visible
Thanks and Stewart Burchell for the elaborate responses. The edit log table is actually going to be used for audit purposes as Stewart mentioned to check every possible update made in the database row.
Stewart Burchell
History table seems to be a good idea, but that might cost high as data grows as you already mentioned.
So, it's all - ALL - about 'value' not cost. Cost by itself is meaningless. You can't buy a house for 5$, and you wouldn't spend $5000 on a loaf of bread. So: "is it worth it?" is the question you should ask yourself. What do you get by doing it, what do you NOT get by NOT doing it? (regarding the potential size - audit tends not to be forever, so you could always implement data purging on your table, to get rid of rows after, say, 12 months so the table doesn't grow indefinitely)