History and Audit Logging Guide
Tracking Event History from End to End
Database Triggers
Move history events are created by Event Triggers and are collected in a single 🔒move history table which captures what event took place, what data changed, and which user initiated the event.
To add history logging to new or untracked tables, create a new migration script (example)
Some things to be aware of regarding history records:
- Events initiated by the system are logged as null users
- Changed data is stored as a JSON string, and to date all data is saved as strings regardless of initial data type
AppContext in Context
Move history utilizes AppContext to capture user information about an event. Any new endpoints added should adhere to the auditable app context pattern in order to correctly capture event information.
Move History Fetcher
The heavy lifting of the Move History Fetcher is done in the raw SQL query.
References:
Frontend Event Templates
On the frontend, move events are displayed based on design requirements and event type. Templates are organized based on event name for clearer context and grouping.