Duplicate column names when updating to 6.4

I’m getting various duplicate column errors when updating to v6.4.0 from 6.3.6. Is there a clean way to bypass those columns, since they’re already there?

Migrating up to 20191208175348 from 20191114132014

++ migrating 20191121150326

 -> ALTER TABLE `ecommerceframework_productindex_store_elastic`
                ADD preparation_status SMALLINT(5) UNSIGNED NULL DEFAULT NULL,
                ADD preparation_error VARCHAR(255) NULL DEFAULT NULL,
                ADD trigger_info VARCHAR(255) NULL DEFAULT NULL;
Migration 20191121150326 failed during Execution. Error An exception occurred while executing 'ALTER TABLE `ecommerceframework_productindex_store_elastic`
                ADD preparation_status SMALLINT(5) UNSIGNED NULL DEFAULT NULL,
                ADD preparation_error VARCHAR(255) NULL DEFAULT NULL,
                ADD trigger_info VARCHAR(255) NULL DEFAULT NULL;':

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'preparation_status'

In AbstractMySQLDriver.php line 65:

An exception occurred while executing 'ALTER TABLE `ecommerceframework_productindex_store_elastic`
                  ADD preparation_status SMALLINT(5) UNSIGNED NULL DEFAULT NULL,
                  ADD preparation_error VARCHAR(255) NULL DEFAULT NULL,
                  ADD trigger_info VARCHAR(255) NULL DEFAULT NULL;':

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'preparation_status'


In PDOConnection.php line 80:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'preparation_status'


In PDOConnection.php line 75:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'preparation_status'

I’ve had similar issues in the past. If you don’t have any data in those columns, you can try dropping them from the database and running the migration again. This was pretty much the only way I was able to move past the issues.

Hi,
on with version of Pimcore are you?
There has been a patch of this migration, see https://github.com/pimcore/pimcore/pull/5458

BR
Christian

Just noticed I apparently didn’t update the composer.json to 6.4. Sometimes, the most obvious solutions are the hardest to see. I re-ran the update this morning, and it worked great!

1 Like