Database Layout for an audit log?

I’d for the good old reliable:

  • Record ID
  • Record type / table
  • User ID of who did the change
  • OPTIONAL: a field capturing the changes

Not sure how would this handle related entities though, because these relations might change after the fact and if you cache them in the table that info might not be relevant anymore at some point.

These 3-4 fields should get you 90% the way there IMO.