Mautic Community Forums

Unable to complete upgrade from v3.2.5 to 3.3

Your software
My PHP version is : 7.4.15
*My MySQL/MariaDB version is MariaDB version
mysql Ver 15.1 Distrib 10.3.17-MariaDB, for Linux (x86_64) using readline 5.1

Updating/Installing Errors
I am Updating
Upgrading via Command Line:
php bin/console mautic:update:apply
php bin/console mautic:update:apply --finish

These errors are showing in the installer* :
An error occurred while updating the database. Check the logs for more information.

These errors are showing in the Mautic log* :

console.ERROR: Error thrown while running command “doctrine:migrations:migrate --quiet --no-interaction”. Message: “An exception occurred while executing ‘ALTER TABLE lead_lists ADD CONSTRAINT FK_6EC1522A12469DE2 FOREIGN KEY (category_id) REFERENCES categories (id) ON DELETE SET NULL’: SQLSTATE[HY000]: General error: 1005 Can’t create table mautic_servizivisionova_com.lead_lists (errno: 150 “Foreign key constraint is incorrectly formed”)” {“exception”:"[object] (Doctrine\DBAL\Exception\DriverException(code: 0): An exception occurred while executing ‘ALTER TABLE lead_lists ADD CONSTRAINT FK_6EC1522A12469DE2 FOREIGN KEY (category_id) REFERENCES categories (id) ON DELETE SET NULL’:\n\nSQLSTATE[HY000]: General error: 1005 Can’t create table mautic_servizivisionova_com.lead_lists (errno: 150 “Foreign key constraint is incorrectly formed”) at /var/www/mautic/mautic.servizivisionova.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:106, Doctrine\DBAL\Driver\PDOException(code: HY000): SQLSTATE[HY000]: General error: 1005 Can’t create table mautic_servizivisionova_com.lead_lists (errno: 150 “Foreign key constraint is incorrectly formed”) at /var/www/mautic/mautic.servizivisionova.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:80, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1005 Can’t create table mautic_servizivisionova_com.lead_lists (errno: 150 “Foreign key constraint is incorrectly formed”) at /var/www/mautic/mautic.servizivisionova.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:75)",“command”:“doctrine:migrations:migrate --quiet --no-interaction”,“message”:“An exception occurred while executing ‘ALTER TABLE lead_lists ADD CONSTRAINT FK_6EC1522A12469DE2 FOREIGN KEY (category_id) REFERENCES categories (id) ON DELETE SET NULL’:\n\nSQLSTATE[HY000]: General error: 1005 Can’t create table mautic_servizivisionova_com.lead_lists (errno: 150 “Foreign key constraint is incorrectly formed”)”}

These errors are showing in the upgrade_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path) : no file upgrade_log.txt found

Your problem
My problem is :
Upgrade failed

Steps I have tried to fix the problem :
none

I went and updated from 3.2.4 → 3.2.5 and all of a sudden lost my dashboard.
Went and upgraded php to 7.4 and ran the CLI update to 3.3 and it kept throwing errors “Could not read the cached update data to apply the update.”

Eventually went back to the UI and saw that everything was updated and now running 3.3.
I can see the updates in the Forms according to the announcements, however the new email + landing page builder were not packed in the release :frowning: sadly. There is a thread on this in slack at the moment, so I am sure that there will be a new release coming in the next day or so.

There is an issue with the upgrade package being tracked in

and fixed in a PR which will be merged shortly:

We will issue a release today to address this - it’s due to some logic in the build script which ignored the builder in the upgrade package only - it is included in the full installation package.

1 Like

Migration issue is being tracked here with a potential workaround:

I updated from v3.2.5 to 3.3.1 and I’m aso missing the blocks inside the dashboard.
My dashboard has only spinning icons.
Everything else works, as far as I can tell.

Hi there,

Please can you share how you did the update (in the UI or at command line?) and whether you’ve cleared the cache?

Are there errors in your logs?

Are there errors in the browser console?

I used the command line.
I have cleared the cache multiple times.

This same thing happened to me when I upgraded to 3.3.1 from 3.2.5. I was able to solve it. You can see how on github.