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

Unknown column 'auditEvents' in 'field list' #922

Open
cristiansoftlead opened this issue Apr 17, 2024 · 0 comments
Open

Unknown column 'auditEvents' in 'field list' #922

cristiansoftlead opened this issue Apr 17, 2024 · 0 comments
Labels
cannot reproduce Unable to replicate the issue

Comments

@cristiansoftlead
Copy link

cristiansoftlead commented Apr 17, 2024

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 10.48.3
Package version 13.6.5
PHP version 8.2

Actual Behaviour

After installation, I added the traits in one of the models and when I try to update an entry, it returns the error:

Column not found: 1054 Unknown column 'auditEvents' in 'field list'
(Connection: mysql, SQL: update `products` set `auditEvents` = ?, `products`.`updated_at` = 2024-04-17 10:53:00 where `id` = 2123)

Indeed, I don't have that column on the products table, but it doesn't say in the documentation that I should update all the tables to add new columns to them.

class Product extends Model implements ProductContract, Auditable {
    use \OwenIt\Auditing\Auditable;

  .....
}

Later edit:
I added auditEvents inside my model and now I didn't receive any error but the audits table it's still empty.

public $auditEvents = [
    'created',
    'updated'
];
@parallels999 parallels999 added the cannot reproduce Unable to replicate the issue label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cannot reproduce Unable to replicate the issue
Projects
None yet
Development

No branches or pull requests

2 participants