BritishYouthBandAssociation / OrgAdmin

Admin site for organisations
1 stars 0 forks source link

Accountability #217

Open rugulous opened 1 year ago

rugulous commented 1 year ago

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

rugulous commented 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

rugulous commented 1 year ago

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

rugulous commented 1 year ago

Found a better way to do this - starting a new branch!

rugulous commented 1 year ago

This went too OTT so let's have a rethinkl