Raised when a caller attempts to UPDATE or DELETE a row in
accrue_events. The append-only guarantee is enforced in two places:
- A Postgres
BEFORE UPDATE OR DELETEtrigger raises SQLSTATE45A01(D-09 primary defense). - A REVOKE migration stub ships at
priv/accrue/templates/migrations/revoke_accrue_events_writes.exsfor host apps to run as defense-in-depth (D-10).
The Accrue.Events module pattern-matches the underlying
Postgrex.Error on the pg_code: "45A01" field (NOT on message string
— D-11) and re-raises this exception so downstream callers see a clean
domain error type.