Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration from 5.0.3 to 5.0.4 doesn't work #13651

Closed
1 task done
myon1664 opened this issue Apr 13, 2024 · 5 comments
Closed
1 task done

Migration from 5.0.3 to 5.0.4 doesn't work #13651

myon1664 opened this issue Apr 13, 2024 · 5 comments
Labels
bug Issues or PR's relating to bugs pending-feedback PR's and issues that are awaiting feedback from the author

Comments

@myon1664
Copy link

myon1664 commented Apr 13, 2024

Mautic Version

5.0.x series

Way of installing

Updating at the command line:
php bin/console mautic:update:find
php bin/console mautic:update:apply
php bin/console mautic:update:apply --finish

PHP version

8.0.30

What browsers are you seeing the problem on?

Not relevant

What happened?

When doing "php bin/console mautic:update:apply --finish", I get the following error messages:

Step    1 [>---------------------------] Migrating database schema...
An error occurred while updating the database. Check log for more details.

How can we reproduce this issue?

Step 1: php bin/console mautic:update:find
Step 2: php bin/console mautic:update:apply
Step 3: php bin/console mautic:update:apply --finish

Relevant log output

[2024-04-13T09:35:14.979921+02:00] mautic.ERROR: Doctrine\DBAL\Exception\TableExistsException: An exception occurred while executing a query: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'ndzh_point_groups' already exists (uncaught exception) at /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php line 45 while running console command `doctrine:migrations:migrate` [stack trace] #0 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/dbal/src/Connection.php(1938): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query)) #1 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/dbal/src/Connection.php(1880): Doctrine\DBAL\Connection->handleDriverException(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query)) #2 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/dbal/src/Connection.php(1105): Doctrine\DBAL\Connection->convertExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\Exception), 'CREATE TABLE `n...', Array, Array) #3 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalExecutor.php(298): Doctrine\DBAL\Connection->executeQuery('CREATE TABLE `n...', Array, Array) #4 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalExecutor.php(173): Doctrine\Migrations\Version\DbalExecutor->executeResult(Object(Doctrine\Migrations\MigratorConfiguration)) #5 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalExecutor.php(96): Doctrine\Migrations\Version\DbalExecutor->executeMigration(Object(Doctrine\Migrations\Metadata\MigrationPlan), Object(Doctrine\Migrations\Version\ExecutionResult), Object(Doctrine\Migrations\MigratorConfiguration)) #6 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/migrations/lib/Doctrine/Migrations/DbalMigrator.php(107): Doctrine\Migrations\Version\DbalExecutor->execute(Object(Doctrine\Migrations\Metadata\MigrationPlan), Object(Doctrine\Migrations\MigratorConfiguration)) #7 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/migrations/lib/Doctrine/Migrations/DbalMigrator.php(71): Doctrine\Migrations\DbalMigrator->executePlan(Object(Doctrine\Migrations\Metadata\MigrationPlanList), Object(Doctrine\Migrations\MigratorConfiguration)) #8 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/migrations/lib/Doctrine/Migrations/DbalMigrator.php(157): Doctrine\Migrations\DbalMigrator->executeMigrations(Object(Doctrine\Migrations\Metadata\MigrationPlanList), Object(Doctrine\Migrations\MigratorConfiguration)) #9 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/MigrateCommand.php(211): Doctrine\Migrations\DbalMigrator->migrate(Object(Doctrine\Migrations\Metadata\MigrationPlanList), Object(Doctrine\Migrations\MigratorConfiguration)) #10 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/console/Command/Command.php(298): Doctrine\Migrations\Tools\Console\Command\MigrateCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\NullOutput)) #11 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/console/Application.php(1058): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\NullOutput)) #12 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand(Object(Doctrine\Migrations\Tools\Console\Command\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\NullOutput)) #13 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(Doctrine\Migrations\Tools\Console\Command\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\NullOutput)) #14 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\NullOutput)) #15 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\NullOutput)) #16 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/app/bundles/CoreBundle/Update/Step/UpdateSchemaStep.php(51): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\NullOutput)) #17 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/app/bundles/CoreBundle/Command/ApplyUpdatesCommand.php(137): Mautic\CoreBundle\Update\Step\UpdateSchemaStep->execute(Object(Symfony\Component\Console\Helper\ProgressBar), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/app/bundles/CoreBundle/Command/ApplyUpdatesCommand.php(99): Mautic\CoreBundle\Command\ApplyUpdatesCommand->finishUpgrade(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Symfony\Component\Console\Helper\ProgressBar)) #19 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/console/Command/Command.php(298): Mautic\CoreBundle\Command\ApplyUpdatesCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #20 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/console/Application.php(1058): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #21 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand(Object(Mautic\CoreBundle\Command\ApplyUpdatesCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #22 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(Mautic\CoreBundle\Command\ApplyUpdatesCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #23 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #24 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #25 /home/clients/760df09ae523c4bb41a2bc54372ebe5b/sites/mtc.souldimension.org/bin/console(16): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #26 {main} [] {"hostname":"h2web178","pid":41231}
[2024-04-13T09:35:14.980698+02:00] mautic.WARNING: Command `doctrine:migrations:migrate` exited with status code 255 [] {"hostname":"h2web178","pid":41231}
[2024-04-13T09:35:14.985109+02:00] mautic.WARNING: Command `mautic:update:apply` exited with status code 1 [] {"hostname":"h2web178","pid":41231}

Code of Conduct

  • I confirm that I have read and agree to follow this project's Code of Conduct




Care about this issue? Want to get it resolved sooner? If you are a member of Mautic, you can add some funds to the Bounties Project so that the person who completes this task can claim those funds once it is merged by a member of the core team! Read the docs here.

@myon1664 myon1664 added bug Issues or PR's relating to bugs needs-triage For new issues/PRs that need to be triaged labels Apr 13, 2024
@dsp76
Copy link

dsp76 commented Apr 13, 2024

Hi @myon1664 - you seem not to use the composer based update process? https://docs.mautic.org/en/5.x/getting_started/how_to_update_mautic.html

Having said this, the documentation is also not 100% correct - but your way to update seems to be the "non composer" based command line process.

@dsp76 dsp76 added the pending-feedback PR's and issues that are awaiting feedback from the author label Apr 13, 2024
@myon1664
Copy link
Author

Hi @dsp76,
Thanks for the feedback.
The documentation isn't clear.
I did the upgrade with command lines as described in the section "Installing updates at the command line" of https://docs.mautic.org/en/5.x/getting_started/how_to_update_mautic.html

@dsp76
Copy link

dsp76 commented Apr 13, 2024

Look at https://docs.mautic.org/en/5.x/getting_started/how_to_update_mautic.html#updating-mautic-composer-based-installs - but also this isn't completely clear. I added my comments here: https://forum.mautic.org/t/changes-to-mautic-docs-about-update-via-composer/31658

Maybe you do a backup of your app directory first, make a copy of your local.php config file and give it a try?

@dsp76 dsp76 removed the needs-triage For new issues/PRs that need to be triaged label Apr 20, 2024
@RCheesley
Copy link
Sponsor Member

Hi @myon1664 thanks for reporting this. Based on your error, I search the existing GitHub issues to find where this was previously reported and fixed.

The fix was made in 5.0.2 so please can you try running the commands suggested here and see if that resolves it (take a full database backup first, as always!)

I'll close this as a duplicate of the existing issues but if it needs to be re-opened just let us know.

@RCheesley RCheesley closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If this issue is continuing with the lastest stable version of Mautic, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs pending-feedback PR's and issues that are awaiting feedback from the author
Projects
None yet
Development

No branches or pull requests

3 participants