Laravel-auditing: Column not found: 1054 Unknown column 'updated_at' in 'field list'

Created on 21 Aug 2017  路  4Comments  路  Source: owen-it/laravel-auditing

| Q | A
| ----------------- | ---
| Bug? | yes
| New Feature? | no
| Framework | Laravel
| Framework version | 5.2
| Package version | 4.0
| PHP version | 7.0.1

Today I have an error and I run composer update after that, laravel auditor stops working! :(

The error is:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'updated_at' in 'field list' 
(SQL: insert into `audits` (`old_values`, `new_values`, `event`, `auditable_id`, `auditable_type`, `user_id`, `url`, `ip_address`, `user_agent`, `login_as`, `call_id`, `mission_id`, `updated_at`, `created_at`) values 
({"result":9}, 
{"result":6}, updated, 145288, 
App\MissionForm, 13, http://localhost:8000/update_mission_record/354126, ::1, 
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36, 115, 354126, 145288, 2017-08-21 07:39:33, 2017-08-21 07:39:33))

Most helpful comment

In the model, write the below code;

public $timestamps = false;

All 4 comments

Have a look at the upgrading section of the documentation.

In the model, write the below code;

public $timestamps = false;

In the model, write the below code;

public $timestamps = false;
this is solving for problem

@rafaelzuckerberg Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

franciscojun picture franciscojun  路  8Comments

AdamKyle picture AdamKyle  路  7Comments

ghost picture ghost  路  5Comments

benabbottnz picture benabbottnz  路  3Comments

rbuckingham picture rbuckingham  路  3Comments