audit_log_actor
File: schema/mixins/audit_log_actor.yaml
Supplies the changed_by actor FK for the audit_log table, parameterized to
the app’s identity table.
Parameters
Section titled “Parameters”| Parameter | Default | Purpose |
|---|---|---|
user_table | users | identity table changed_by FKs to |
user_pk | user_id | primary-key column of user_table |
These mirror the audit mixin’s
parameters, so a single imports[].params override repoints
created_by / updated_by and audit_log.changed_by at the same identity
table.
Column
Section titled “Column”| Column | Type | Null | Notes |
|---|---|---|---|
changed_by | bigint | NOT NULL | FK → {user_table}.{user_pk}, ON DELETE RESTRICT / ON UPDATE CASCADE |
Why it’s separate
Section titled “Why it’s separate”The audit_log table can’t carry the audit
mixin itself — that would attach the stamping triggers recursively to the audit
table. So the one piece it does need from the audit family, the parameterized
actor FK, is factored into this dedicated mixin. changed_at is recorded inline
by the inserting trigger.