Error during migration from 2.8.1 to 2.9

Hi all, I have mautic 2.8.1 installed on AWS. I got a notification in the app to upgrade to 2.9. Went through the process and database migration failed.

I followed the steps at https://johnlinhart.com/blog/uh-oh-mautic-upgrade-was-not-successful and got to this error message:



Migration 20160926182807 failed during Execution. Error An exception occurred while executing ‘insert into mau_companies_leads (company_id, lead_id, date_added, manually_added, manually_removed) SELECT c.id, l.id, ‘2017-06-09 09:16:09’, 0, 0 from mau_leads l join mau_companies c on c.companyname = l.company ON DUPLICATE KEY UPDATE company_id = c.id;’:



SQLSTATE[HY000]: General error: 1364 Field ‘is_primary’ doesn’t have a default value



How do I resolve this issue? Stupid me didn’t even keep a backup of the database before migration. Would really appreciate your help in resolving this.

Hi all, I have mautic 2.8.1 installed on AWS. I got a notification in the app to upgrade to 2.9. Went through the process and database migration failed.
I followed the steps at https://johnlinhart.com/blog/uh-oh-mautic-upgrade-was-not-successful and got to this error message:

Migration 20160926182807 failed during Execution. Error An exception occurred while executing ‘insert into mau_companies_leads (company_id, lead_id, date_added, manually_added, manually_removed) SELECT c.id, l.id, ‘2017-06-09 09:16:09’, 0, 0 from mau_leads l join mau_companies c on c.companyname = l.company ON DUPLICATE KEY UPDATE company_id = c.id;’:

SQLSTATE[HY000]: General error: 1364 Field ‘is_primary’ doesn’t have a default value

How do I resolve this issue? Stupid me didn’t even keep a backup of the database before migration. Would really appreciate your help in resolving this.

I see that this issue is identical to https://github.com/mautic/mautic/issues/4208 Do I need to login to the database directly to fix this problem, or can anyone guide me for this fix through the command line?