I am looking to maintain a full audit trail of user actions through the events table. However, I noticed that nothing is published to the events table when a query is saved. This would become a problem if a user were to edit a query and save it without executing or publishing the query. In this case, it seems like there would be no way of knowing who changed the query or what it was changed to.
The following solution mentions that there should be some “save query” events in the events table but I do not see any: How to subscribe query changes?
Does this logging already exist somewhere else? If not, are there any suggestions for logging saved queries and logging what they were saved to?
Logging save actions would be easy enough. Just add a record_event call to the query update handler. Recording the change contents themselves seems like the wrong idea, since the events table would then be a form of (very inefficient) change tracking. For example, if a user changes one line of a 1k line query, 2k lines would be injected on the events table (rather than the just the diff).