Mautic Community Forums

Database error during update from 3.3.3 to 4.0.1

Your software
My PHP version is : 7.4
My MySQL/MariaDB version is (delete as applicable): 10.4.21

Updating/Installing Errors
I am (delete as applicable): Updating
Upgrading/installing via (delete as applicable) : Command Line

These errors are showing in the installer :
An error occurred while updating the database. Check log for more details.

These errors are showing in the Mautic log :
[2021-10-04 20:00:05] mautic.NOTICE: Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing ‘SELECT i0_.is_published AS is_published_0, i0_.date_added AS date_added_1, i0_.created_by AS created_by_2, i0_.created_by_user AS created_by_user_3, i0_.date_modified AS date_modified_4, i0_.modified_by AS modified_by_5, i0_.modified_by_user AS modified_by_user_6, i0_.checked_out AS checked_out_7, i0_.checked_out_by AS checked_out_by_8, i0_.checked_out_by_user AS checked_out_by_user_9, i0_.id AS id_10, i0_.name AS name_11, i0_.description AS description_12, i0_.alias AS alias_13, i0_.public_name AS public_name_14, i0_.filters AS filters_15, i0_.is_global AS is_global_16, i0_.is_preference_center AS is_preference_center_17, i0_.category_id AS category_id_18 FROM mautic_lead_lists i0_ LEFT JOIN mautic_categories i1_ ON i0_.category_id = i1_.id ORDER BY i0_.name ASC’: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘i0_.category_id’ in ‘field list’ (uncaught exception) at /home/abc/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 79 while running console command mautic:segments:update
[2021-10-04 20:00:05] mautic.WARNING: Command mautic:segments:update exited with status code 1
[2021-10-04 20:00:07] mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘ALTER TABLE mautic_forms ADD progressive_profiling_limit INT(11) DEFAULT NULL;’: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs (uncaught exception) at /home/abc/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 128 while running console command doctrine:migrations:migrate
[2021-10-04 20:00:07] mautic.WARNING: Command doctrine:migrations:migrate exited with status code 1
[2021-10-04 20:00:07] mautic.WARNING: Command mautic:update:apply exited with status code 1

Your problem
My problem is :
I have 2 Mautic instances (2 websites) running on the same server, both running identical versions. I was able to upgrade 1 of the 2 instances successfully. However, on the 2nd instance I received the error as shown above.

Steps I have tried to fix the problem :
Clear all cache then tried “mautic:update:apply --finish” again.

I was able to fix this issue by doing a mysql_upgrade.

2 Likes