I have a column Quantity
in a table Inventory
of MySQL which gets updated from multiple sources. I needed to maintain a track in the table on another column called QuantityLog
on the last updated time of the Quantity
and the source which did it. Something like this should be the content of QuantityLog
column (Text type) (only the latest update details is required):
<Log>
<UpdateTime>2015-02-23 12:00:01 PM</UpdateTime>
<Source> Feeder application</Source>
</Log>
I am aware of how to do it using trigger if only the update time is required. However, with the trigger approach is there any other mechanism to get the source and use this too?
Do note pls that I am trying to perform this via triggers only as any other mechanisms of using my application to do this will require me to change in all applications that make this change and I am not inclined to do that.