currently I found myself wondering if this is the right thing to do in this case.
You see I have a database called for example Warehouse
I this database I have two tables:
[the table items is for saving the items of the system add-modify-delete records]
- Items (which its columns are )
- TAG_ID
- P_NUMBER
- QUANTITY
- TYPE
- LOCATION
- DESCRIPTION
- REASON
- USERID
- DATE
[the table lastchanges is for saving the items of the system that has been changed]
- lastchanges (which its columns are )
- ID
- TAGID
- PNUMBER
- USERID
- ACTION
- DATING
Now I have been asked to add "exactly what has been changed" to the current form, for example if the quantity changed I have to show that before and after in a bootstrap form.
My brain told me to just add all the columns of the table items into lastchanges and save on those columns the data before changing and into items the new modified data, but performance-wise I see this as a bad action and I want your opinion.