Table history (auditing)
Auditing is a differentiator for data-heavy systems: it reduces “who changed what?” ambiguity and makes production support faster.
This page shows how to:
- Add standard audit fields (created/changed by + timestamp)
- Enable SQL Server system-versioned history and surface it in the GUI
Prerequisites
Section titled “Prerequisites”- Access to Thinkstore in Software Factory (SF).
- SQL Server supports system-versioned (temporal) tables for your environment.
- You can install and activate base models in the project branch.
Trace fields (audit columns)
Section titled “Trace fields (audit columns)”Trace fields are provided as a base model in the Thinkstore.
Download the model from Thinkstore
Section titled “Download the model from Thinkstore”- Open the Thinkstore: SF → menu → enrichments → Thinkstore
- Search for “trace fields”
- Download and install the model
- Choose a name/version (this is what you’ll see in Base Models)
Activate the base model
Section titled “Activate the base model”- Model Overview → Branches → Base models
- Find the model you installed (e.g. “Trace fields”)
- Mark it as active
- Generate definition
- Create the complete model
You should now have four read-only fields in each table that are filled automatically.
Logging changes in the GUI (system versioning)
Section titled “Logging changes in the GUI (system versioning)”SQL Server system-versioning can track row history automatically. With trace fields in place, you can also see who changed what and when.
Download the model from Thinkstore
Section titled “Download the model from Thinkstore”- Open the Thinkstore: SF → menu → enrichments → Thinkstore
- Search for “Logging data available in the GUI”
- Download and install the model
- Choose a name/version (this is what you’ll see in Base Models)
Activate the base model
Section titled “Activate the base model”- Model Overview → Branches → Base models
- Find the model you installed
- Mark it as active
- Generate definition
- In your Data Model, add details from the main table to the view
[table_name]_history_overview - Create the complete model
You should now have a GUI tab that shows history and highlights changed fields.
Verify
Section titled “Verify”- Open a record in the GUI and confirm audit fields exist and are read-only.
- Change a field, save, and confirm the history tab shows the previous values.