Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Viatori's avatar

Field id doesn't have a default value

Hey everybody,

I have little problem...

I created an action in laravel nova.

When I click on it in local, i have an error :

Illuminate\Database\QueryException SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value (SQL: insert into `action_events` (`actionable_id`, `actionable_type`, `batch_id`, `changes`, `created_at`, `exception`, `fields`, `model_id`, `model_type`, `name`, `original`, `status`, `target_id`, `target_type`, `updated_at`, `user_id`) values (76, App\FormationDate, 919ab4c8-3fa3-46d0-893f-d65dcb9781c8, ?, 2020-09-24 10:34:00, , a:0:{}, 76, App\FormationDate, Envoyer le J-7, ?, running, 76, App\FormationDate, 2020-09-24 10:34:00, 1))

How to solve it ? I have the same problem when i want to delete a resource....

Thanks for your help,

Thibaut

0 likes
2 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

can you show the migration for action_events?

Viatori's avatar

@sinnbeck thanks for you reply.... i checked it... and.... no auto_increment....

fixed...

thanks,

Thibaut

Please or to participate in this conversation.