DEV Community

Discussion on: Design a Table to Keep Historical Changes in Database

Collapse
 
syedalisait profile image
Syedalisait

Hi - Very good post on Auditing Mysql.

Question:
Can you actually show an example of how would you write a trigger for 3rd approach which is the audit table. I have implemented this but the trigger query that I use is very costly. So wanted to understand how would you implement column level changes to be recorded in audit table

Collapse
 
zhiyueyi profile image
Zhiyue Yi

Hi, thanks a lot!

I used C# and entity framework and the audit records are generated at code level. So unfortunately I didn't write a trigger for that.