V5 Migration failing with Serialization of 'Closure' is not allowed

I’m trying to migrate from v4.5.42 to v5.2.11.

When trying the migration, it goes through all the steps, but then I receive a migration failed error with the following error:
Looks like something went wrong with the migration for the following company: Company Name
SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘company_key’ in ‘where clause’ (SQL: select exists(select * from companies where (company_key = key_value)) as exists)
SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘company_key’ in ‘where clause’ (SQL: select exists(select * from companies where (company_key = key_value)) as exists)

Looking through the logs, I find this error:
production.ERROR: Serialization of ‘Closure’ is not allowed {“userId”:1,“exception”:"[object] (Exception(code: 0): Serialization of ‘Closure’ is not allowed at /home4/root-folder/vendor/laravel/framework/src/Illuminate/Queue/Queue.php:158)

@david any thoughts on this?

It looks like your application is pointing to the incorrect database.

Which application/database are you referring to?

The v4 app is working fine as well as the v5 new company.

Hi,
During migration from 4.5.31 to 5.2.8,

I have the “production.ERROR: Serialization of ‘Closure’ is not allowed {“userId”:1,“exception”:”[object] (Exception(code: 0): Serialization of ‘Closure’ is not allowed at /home/clients/5d3129c9e0d386b2acbb121b795c5773/sites/xxxxx/apps/vendor/laravel/framework/src/Illuminate/Queue/Queue.php:158)" error
and in the received mail
“Undefined index: number
Undefined index: number”

Could you help me ?