-
Notifications
You must be signed in to change notification settings - Fork 3
Audit Schema
Entity Relationship Diagram created with Skipper
These four entities are populated using the php index.php zf-doctrine-audit:data-fixture:import
tool. Once populated their data does not change unless a change happens to the target schema.
This fixture is one of insert, update, delete, epoch. This is the type of action a RevisionEntity audits when created.
This term is used for the entities created for each target entity too. This section describes the fixture pictured above. AuditEntity maps a dynamically generated audit entity and the table used. AuditEntity has a 1:1 relationship with TargetEntity.
The TargetEntity maps an entity from the target object manager and it's table name. TargetEntity has a 1:1 mapping with AuditEntity and one to many with Identifier.
Stores primary key identifier field and column information for each TargetEntity.
These three entities store the information about every audit record.
Stores the user, comment, and timestamp for a flush()
event in the target object manager. Many entities may be persisted, updated, or deleted in a single flush and this groups those audit records together.
Links a Revision to a RevisionType to a TargetEntity and stores the title (if any) for the TargetEntity at the time it was created. This title is fetched from the target entity if it has a __toString()
method.
Stores the Identifier values for a RevisionEntity by linking an Identifier to a RevisionEntity.
For every target entity configured a [new entity and table](Audit Internals) is created for the audit object manager. These audit entities mirror the column name and data type for each column in the target database and do not have the same referential integrity or indexes. You may directly interact with these though the audit object manager. To find a mapping use the AuditEntity relationship with TargetEntity.
The primary key for each is revisionEntity_id compounded with the target table primary key(s).
Each audit entity also has a field, revisionEntity_id, which maps to RevisionEntity.
zf-doctrine-audit © 2016 API Skeletons. Released under the MIT license.