Record versioning
Record versioning keeps an append-only history of every change to an object’s records. Enable it when you need an audit trail (who changed what, when, and how) without building custom logging yourself.
Typical scenarios:
- compliance or internal audit on tickets, contracts, or master data;
- “what did this record look like last week?” reviews on a detail page;
- soft investigation of accidental edits without restoring a full snapshot.
How it works
On a normal (non-global) object, open the object menu and choose Enable versioning…. Bobuild:
- Creates a managed history sibling object (default name
<object>_history). - Adds fixed provenance fields on the history object.
- Mirrors the primary’s fields onto the history object (with the exceptions below).
- Installs database triggers that append a history row on every create, update, and delete.
The primary stays the live working copy. History rows are append-only: you can list and filter them in grids or the SQL Console, but you cannot insert, update, or delete them by hand (SQL Console refuses those writes).
Do not create or reshape the history object yourself. Enable or disable versioning only from the primary object (or via the MCP ops object.enable_versioning / object.disable_versioning).
Provenance fields
Every history row includes system fields such as:
| Field | Meaning |
|---|---|
| record / record_id | Which primary row this version belongs to |
| versioned_at | When the change was recorded |
| operation | Create, update, or delete |
| source | Where the write came from (form, task, API, import, …) |
| logged_in_object / logged_in_object_id | Who was signed in when the change happened (when available) |
Put app-specific “who / why” fields on the primary (for example a Choice “change reason”) so they are mirrored into each version automatically.
What is mirrored
Most field types are copied onto the history sibling. File, Multiple Files, and Image are not mirrored — binaries are not snapshotted, so history would only hold broken links.
Reference and Reference Array fields are mirrored for widgets, and Bobuild also adds a durable companion ID column (for example customer_id or tags_ids) so raw IDs survive if the linked target is later deleted.
You cannot enable versioning while the primary already has fields named like the history system fields (record, record_id, versioned_at, operation, source, logged_in_object, logged_in_object_id). Rename those first. Global (singleton) objects cannot be versioned.
Showing history in the app
Wire a grid (or detail) to the history object, filtered to the current primary record (for example record is the page’s current row). Place it on the primary’s detail or edit page so operators can browse past versions in context.
Disabling versioning
Disable versioning… on the primary deletes the managed history sibling (and its version rows) when nothing else references it. That destroys history data and cannot be undone — take a snapshot first if you might need the trail later.
Related
- Field types — what can live on the primary
- Global objects — singletons cannot be versioned
- SQL Console —
SELECTon history is fine; mutations are blocked - Snapshots — full app backup vs per-record history