Open rugulous opened 1 year ago
This may seem like a good use case for Sequelize
's hooks, but unfortunately I don't think it will be that simple.
We need to track the user performing the action, which won't be in the DB so won't be doable by a raw trigger
I suppose we should really know who created/most recently changed any entity, so it may make sense to add these fields to all of our tables
Found a better way to do this - starting a new branch!
This went too OTT so let's have a rethinkl
We need to log when certain actions are taken, and who has done them
This is essentially giving each entity a
CreatedBy
/LastModifiedBy
attribute (plus date/time), as well as logging a few extra key actions