The audit infrastructure records who did what and when across all areas of Mosaic. Schema versioning tables track which database upgrades have been applied. This article covers both areas for report writers who need to query audit data or check the current schema version.
Audit actions table
MO_AUDIT_ACTIONS
The main audit table records all auditable user actions across the application.
β
βACTION_TYPE_CODE values:
Code | Meaning |
B | Begin |
R | Read |
E | Edit |
A | Add |
D | Delete |
SAVE | Step saved |
FINISH | Step finished |
CANCEL | Step cancelled |
CLOSE | Step closed |
LOCK | Step locked |
UNLOCK | Step unlocked |
DOWNLOAD | Document downloaded |
UPLOAD | Document uploaded |
FIND | Search performed |
COMPARE | Merge comparison |
VERIFY | Merge verification |
ACT_FOR | Acting on behalf of another worker |
COPY | Record copied |
Record printed | |
SUMMARY | Summary viewed |
RECORD_TYPE covers 40+ entity types including: PERSON, STEP, CASE_NOTE, DOCUMENT, GROUP, FORM, WORKER, and TEMPLATE.
Audit trail tables
Individual domain areas have their own audit trail tables that record the history of changes:
Table | Description |
AUD_MO_CASE_NOTES | Audit trail for case note header changes. Action values: I (insert), U (update) |
AUD_MO_CASE_NOTE_DETAILS | Audit trail for case note detail changes |
Schema versioning
MO_SCHEMA_VERSION_UPGRADES
Tracks which schema versions have been applied to the database.
Column | Description |
SCHEMA_VERSION_CODE | Version string, e.g. '25.2.0.0' |
UPGRADE_START_DATETIME | When the upgrade began |
UPGRADE_END_DATETIME | When the upgrade completed (NULL while in progress) |
Check the current schema version:
```sql
SELECT SCHEMA_VERSION_CODE
FROM MO_SCHEMA_VERSION_UPGRADES
WHERE UPGRADE_END_DATETIME IS NOT NULL
ORDER BY UPGRADE_START_DATETIME DESC
```
π€Tip: Check this table to confirm which schema version is running on your database before writing reports that depend on specific tables or columns.
Other schema management tables
Table | Description |
MO_SCHEMA_VERSION_CHANGES | Individual changes applied within each version upgrade |
MO_APPLICATION_VERS_UPGRADES | Application-level version upgrade attempts with success/failure tracking |
MAINTAINED_OBJECT_CHANGES | Log of every DDL change including the SQL executed and its reverse |
MAINTAINED_IDENTITIES | Registry of auto-identity tables (Oracle only) |
