ProcessManager icon indicating copy to clipboard operation
ProcessManager copied to clipboard

Migration Version20230321092750 throws exception with 'Column already exists: messengerPending'

Open jcalifice-basecom opened this issue 1 year ago • 1 comments

Try to install Process Manager from dev-master using Pimcore 11.3.2. When executing migrations, it throws an exception:

[warning] Migration Pimcore\Bundle\EcommerceFrameworkBundle\Migrations\Version20210430124911 was executed but did not result in any SQL statements. [warning] Migration Elements\Bundle\ProcessManagerBundle\Migrations\Version20230207000000 was executed but did not result in any SQL statements. [error] Migration Elements\Bundle\ProcessManagerBundle\Migrations\Version20230321092750 failed during Execution. Error: "An exception occurred while executing a query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'messengerPending'" 13:47:01 CRITICAL [console] Error thrown while running command "doctrine:migrations:migrate --no-interaction". Message: "An exception occurred while executing a query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'messengerPending'" ["exception" => Doctrine\DBAL\Exception\NonUniqueFieldNameException^ { …},"command" => "doctrine:migrations:migrate --no-interaction","message" => "An exception occurred while executing a query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'messengerPending'"]

which comes from the following SQL:

public function up(Schema $schema): void { $this->addSql( 'ALTER TABLE bundle_process_manager_monitoring_item ADDmessengerPendingTINYINT(4) NOT NULL DEFAULT "0" afterpublished' ); }

Any idea how to fix that?

jcalifice-basecom avatar Sep 04 '24 11:09 jcalifice-basecom

We have the same problem, but can't understand why the column already exists. As a quick-and-dirty solution, we deleted the column manually and ran the migration again. But this shouldn't be the solution. According to the code, the column is only created in the migration, so we are currently assuming a timing problem or a duplicate execution of the migration.

code-status-404 avatar Sep 06 '24 06:09 code-status-404

Hi, i currently tested the installation on a fresh pimcore v2024.3 (v11.4.2) but i wasn't able to reproduce this. I followed the exact installation guide on https://github.com/valantic-at/ProcessManager/blob/master/doc/installationAndUpdates.md so i guess it's an Pimcore issue.

BR, Christian

ctippler avatar Nov 28 '24 20:11 ctippler