I'm wondering what could be the best approach to being able to store some custom metadata with each record in the audit tables?
Do I need a custom provider? How would I tell Auditor about the new column in the schema? I found a few options (hooking into the AuditEvent, extending DoctrineProvider and so on), but it all feels hacky.
Could you point me in some direction? I'd be happy to then either improve readme, or submit a PR for whoever is interested.
The background for this need is adding a tenant_id column to each audit row so that we can apply row-level security on server-side with PostgreSQL.
I'm wondering what could be the best approach to being able to store some custom metadata with each record in the audit tables?
Do I need a custom provider? How would I tell Auditor about the new column in the schema? I found a few options (hooking into the AuditEvent, extending DoctrineProvider and so on), but it all feels hacky.
Could you point me in some direction? I'd be happy to then either improve readme, or submit a PR for whoever is interested.
The background for this need is adding a
tenant_id
column to each audit row so that we can apply row-level security on server-side with PostgreSQL.