Skip to content

app.audit_events

TablePartitioned by monthRow level security on

Append-only compliance ledger (Section 7.3, Section 8.4): who did what to which row, with a diff. Kept 7 years in monthly partitions; personal data in plaintext is redacted at 90 days at every JSON depth (invariant 23).

Primary key: id, created_at

Columns of app.audit_events
ColumnTypeNullableDescription
iduuidNoAudit event id, UUID v7.
org_iduuidNoOwning org. A row never moves to another org.References app.organizations.id
actor_kindapp.actor_kindNoPerson, Service or System.
actor_person_iduuidYesPerson who acted, when a person acted.References app.people.id
actiontextNoWhat happened, as table.operation (for example membership_roles.insert) or a named act (for example dsar.exported).
subject_tabletextNoTable of the row acted on.
subject_iduuidYesId of the row acted on.
diffjsonbNoAudit diff: the new values on insert, the old and new values of changed columns on update, the old values on delete. Restricted columns and hashes are never included.
actor_ipinetYesClient IP address of the request. Removed at redaction.
user_agenttextYesClient user agent of the request. Removed at redaction.
request_idtextYesRequest id from the API, for correlating with logs.
redacted_attimestamp with time zoneYesWhen personal data in diff, actor_ip and user_agent was redacted.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.