Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audit_trail should always have an audit_id for grouping #47

Closed
cornernote opened this issue Jun 22, 2015 · 0 comments
Closed

audit_trail should always have an audit_id for grouping #47

cornernote opened this issue Jun 22, 2015 · 0 comments

Comments

@cornernote
Copy link
Contributor

Use case:

I want to not insert audit_entry rows, unless there is errors or trails. In the case of errors or trails they should be given an audit_id for grouping and logging purposes. This means the audit_trail.user_id field is no longer required.

The problem:

Some people want to use audit_trail stand-alone, without writing tons of data to the audit_entry and audit_data tables.

The solution:

The audit_entry table should be ultra light - no large data at all. #46 should take care of this. Once it's closed we can force an audit_entry to be created when trails or errors happen, eg:

In AuditingBehavior.php change this:

$entry = Auditing::current() ? Auditing::current()->getEntry() : null;

to this:

$entry = Yii::$app->auditing->getEntry(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant