Unable to Upgrade Mautic version 5.0.4 to 5.1

Your software
My Mautic version is:5.0.4
My PHP version is: 8.1.28
My Database type and version is:10.11.7-MariaDB

Your problem
My problem is: I am updating to new version using UI and terminal using this documentation How to update Mautic — Mautic Documentation 0.1 documentation
but on the finish step, DB is unable to retrieve changes

These errors are showing in the log:

Steps I have tried to fix the problem:

Could you please share the error message / screenshot you have?

Here is the error message:

root@cyberpanel-vnic:~# cd /home/mautic.sunbposolutions.in/public_html/root@cyberpanel-vnic:/home/mautic.sunbposolutions.in/public_html# /usr/local/lsws/lsphp81/bin/php bin/console mautic:update:apply
Are you sure you wish to update Mautic to the latest version? y
Step 6 [----->----------------------] Removing deleted files

IMPORTANT: Run the same command again with --finish. For example ‘php bin/console mautic:update:apply --finish’
root@cyberpanel-vnic:/home/mautic.sunbposolutions.in/public_html# /usr/local/lsws/lsphp81/bin/php bin/console mautic:update:apply --finish
Step 1 [>---------------------------] Migrating database schema…

An error occurred while updating the database. Check log for more details.

I’m not sure if this is the right place to post this, but I’ve been searching the forum for over an hour and can’t find a straightforward way to create a new post. I apologize to the original poster for adding my question here, but I’m really lost.

I’ve just installed the new version of the software, and as a first-time user, I’m running into some issues. Everything seems to be installed correctly, but I’m using a VPS server instead of a dedicated server. I’ve set it up under a subdomain, and while sending and tracking emails works fine, I’m having trouble with the Campaign Builder. Every time I try to create an email, I get the error message: “Your request could not be processed, please try again.” The logs don’t seem to provide any clues.

I’ve reinstalled the software three times now and keep facing the same issue. The software is behind a basic firewall, and I can’t find any documentation about specific port requirements. Can anyone help me out? I’m getting really frustrated with this and am about to give up on it, even though it came highly recommended. Thanks in advance for any assistance!

Hi Joeyk
Here is the error message:

root@cyberpanel-vnic:~# cd /home/mautic.sunbposolutions.in/public_html/root@cyberpanel-vnic:/home/mautic.sunbposolutions.in/public_html# /usr/local/lsws/lsphp81/bin/php bin/console mautic:update:apply
Are you sure you wish to update Mautic to the latest version? y
Step 6 [----->----------------------] Removing deleted files

IMPORTANT: Run the same command again with --finish. For example ‘php bin/console mautic:update:apply --finish’
root@cyberpanel-vnic:/home/mautic.sunbposolutions.in/public_html# /usr/local/lsws/lsphp81/bin/php bin/console mautic:update:apply --finish
Step 1 [>---------------------------] Migrating database schema…

An error occurred while updating the database. Check log for more details.

Hi I suspect migration files are causing problems,

I would run

php bin/console doctrine:migrations:migrate

to execute each migration separately and see which migration file is causing problems.

When you have that you can investigate why update is failing.

Updating from 5.0.4 does not work due to differences in the database tables from the additional tables and seemingly columns

The instructions within this link is null & void, going from 5.0.4 to 5.1.0. Copying the local.php file generates an error 500 message and having to go through it line by line to find where the issue is, is long winded.

Is there effective way to update from 5.0.4 which includes database changes?

When you execute the migrations like I suggested above once the command fails, you will see exactly which file (migration it failed at).

So you do not have to check every migration, just the one it failed.

As for local.php if you have issues, copy local.php from a clean mautic test instance, after you issue mautic:install command, copy it to your real instance, login to mautic and then got to Configuration > Save & Close, this will repopulate local.php with default values.

You should get rid of errors to some degree. After that you go and you set all the config. values via web UI.