Command `doctrine:migrations:migrate` exited with status code 1

Hi, Mautic community

My Mautic version is: 4.2.1
My PHP version is: 7.4.28
My Database type and version is: 10.3.34 MariaDB.

I am having an issue while upgrading the database schema. I noticed that some part of the Mautic dashboard is broken and the rest are working fine. I am having an error message while I go in some pages of the Mautic dashboard. For example: “Edit contact page”.

The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.

Upon checking the log, I noticed that I have an SQL error.

[2022-03-30 12:07:45] mautic.NOTICE: Doctrine\DBAL\Exception\SyntaxErrorException: An exception occurred while executing 'ALTER TABLE `xo_lead_event_log` RENAME INDEX `IDX_SEARCH` TO `xo_IDX_SEARCH`':  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INDEX `IDX_SEARCH` TO `xo_IDX_SEARCH`' at line 1 (uncaught exception) at /home/domain.com/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 98 while running console command `doctrine:migrations:migrate` [] []

[2022-03-30 12:07:45] mautic.WARNING: Command `doctrine:migrations:migrate` exited with status code 1 [] []

I tried running php bin/console doctrine:migration:migrate command from SSH & also tried accessing https://domain.com/s/update/schema but nothing helped.

How to fix this?

Thank you.

I wrote a post about migration problems, I think if you stick with the process described there you should be able to resolve the issues:

Thank you @mzagmajster

I dropped IDX_SEARCH index from xo_lead_event_log table using PHPMyAdmin tool.

Then, tried running php bin/console doctrine:migrations:migrate command from SSH.

It worked. Now DB schema has been updated successfully.

Once again thank you.