app.domain_events
TableRow level security on
Append-only domain event table that webhook delivery reads (Section 10.1). Rows are written only by database triggers, so every state change is emitted exactly once.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org. A row never moves to another org.References app.organizations.id |
| event_type | text | No | Event code from the catalog, for example record.state_changed.References private.domain_event_types.code |
| subject_table | text | No | Table of the row the event describes. |
| subject_id | uuid | No | Id of the row the event describes. |
| project_id | uuid | Yes | Project of the subject, when it belongs to one, for per-project subscriptions.References app.projects.id |
| data | jsonb | No | Outbound webhook payload: the subject fields the event names. Never carries restricted columns. |
| occurred_at | timestamp with time zone | No | When the event happened. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |