'Laravel Nova Delete action_events query throwing Invalid datetime when running actions. Completely blocks actions

Every so often, after a week or so, we will get an error in Nova that completely blocks actions. If I clear out the action_events table, every thing works again.

We use UUIDs for most of our primary IDs.

It seems like it is trying to use a UUID as a datetime, but I don't even see a datetime in the query.

Does anyone have any idea what might be going on here?

Next time it happens I will dump the action_events table to see if I can see if there is some corruption I can identify there.

{ "message": "SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: '940f0f56-5a33-4797-8d86-ab4791900c05' (SQL: delete from action_events where actionable_id = 158 and actionable_type = App\Models\QRCode and id not in (select id from (select id from action_events where actionable_id = 158 and actionable_type = App\Models\QRCode order by id desc limit 25) as action_events_temp))", "level": 400, "level_name": "ERROR", "channel": "production", "datetime": "2022-02-11T14:10:09+00:00", "context_userId": "93c6ca39-0a61-45d7-ac6b-a6139a3046e7", "context_exception": "{"class":"Illuminate\\Database\\QueryException","message":"SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: '940f0f56-5a33-4797-8d86-ab4791900c05' (SQL: delete from action_events where actionable_id = 158 and actionable_type = App\\Models\\QRCode and id not in (select id from (select id from action_events where actionable_id = 158 and actionable_type = App\\Models\\QRCode order by id desc limit 25) as action_events_temp))","code":22007,"file":"/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712",}}}", }



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source