Migration issue after upgrade

Hello,

I updated passbolt from 2.12.1 as it stopped working properly in chrome and had this issue Update passbolt
Post helped, this error disappeared, but now there is a problem with a different index. I’m using Centos 7 x86_64 and PHP 7.4.33

sudo su -s /bin/bash -c “/usr/share/php/passbolt/bin/cake migrations migrate --no-lock” nginx
PHP Warning: Module ‘gnupg’ already loaded in Unknown on line 0
using migration paths

  • /etc/passbolt/Migrations
    using seed paths
  • /etc/passbolt/Seeds
    using environment default
    using adapter mysql
    using database passbolt
    ordering by creation time

== 20230512220600 V410ImproveFoldersRelationsIndexesShareFoldersPerformance: migrating
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1280 Incorrect index name ‘foreign_model’ in /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:192
Stack trace:
#0 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(192): PDO->exec()
#1 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Util/AlterInstructions.php(108): Phinx\Db\Adapter\PdoAdapter->execute()
#2 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(626): Phinx\Db\Util\AlterInstructions->execute()
#3 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(1001): Phinx\Db\Adapter\PdoAdapter->executeAlterSteps()
#4 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(477): Phinx\Db\Adapter\PdoAdapter->executeActions()
#5 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php(420): Phinx\Db\Adapter\AdapterWrapper->executeActions()
#6 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(477): Phinx\Db\Adapter\TimedOutputAdapter->executeActions()
#7 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php(151): Phinx\Db\Adapter\AdapterWrapper->executeActions()
#8 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(719): Phinx\Db\Plan\Plan->execute()
#9 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(627): Phinx\Db\Table->executeActions()
#10 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Table.php(152): Phinx\Db\Table->update()
#11 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(686): Migrations\Table->update()
#12 /etc/passbolt/Migrations/20230512220600_V410ImproveFoldersRelationsIndexesShareFoldersPerformance.php(36): Phinx\Db\Table->save()
#13 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(111): V410ImproveFoldersRelationsIndexesShareFoldersPerformance->up()
#14 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(388): Phinx\Migration\Manager\Environment->executeMigration()
#15 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(359): Phinx\Migration\Manager->executeMigration()
#16 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(122): Phinx\Migration\Manager->migrate()
#17 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php(37): Phinx\Console\Command\Migrate->execute()
#18 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/Phinx/Migrate.php(85): Migrations\Command\Phinx\Migrate->parentExecute()
#19 /usr/share/php/passbolt/vendor/symfony/console/Command/Command.php(298): Migrations\Command\Phinx\Migrate->execute()
#20 /usr/share/php/passbolt/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#21 /usr/share/php/passbolt/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#22 /usr/share/php/passbolt/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#23 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(126): Symfony\Component\Console\Application->run()
#24 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/BaseCommand.php(189): Migrations\Command\MigrationsCommand->execute()
#25 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(198): Cake\Console\BaseCommand->run()
#26 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php(334): Migrations\Command\MigrationsCommand->run()
#27 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php(172): Cake\Console\CommandRunner->runCommand()
#28 /usr/share/php/passbolt/bin/cake.php(13): Cake\Console\CommandRunner->run()
#29 {main}

I think solution is the same in it’s idea, just recreate the index, but i’m not really sure how to do it properly