akeneo / transporteo

Migration Tool for Akeneo PIM from 1.7 to 2.0
Other
8 stars 7 forks source link

Migration issue generating a 500 error #91

Open LaureBrosseau opened 6 years ago

LaureBrosseau commented 6 years ago

Error while migration data from EE 1.7 to EE 2.0, raised by a client:

Migrating files data... Migrating structure data... Migrating families data... PHP Fatal error: Uncaught Error: Wrong parameters for Akeneo\PimMigration\Domain\DataMigration\QueryException([string $message [, long $code [, Throwable $previous = NULL]]]) in /home/akeneo/transporteo/src/Infrastructure/Cli/LocalMySqlQueryExecutor.php:30 Stack trace:

0 /home/akeneo/transporteo/src/Infrastructure/Cli/LocalMySqlQueryExecutor.php(30): Exception->__construct('Query "ALTER TA...', '42S21', Object(PDOException))

1 /home/akeneo/transporteo/src/Infrastructure/Cli/LocalConsole.php(48): Akeneo\PimMigration\Infrastructure\Cli\LocalMySqlQueryExecutor->execute('ALTER TABLE ake...', Object(Akeneo\PimMigration\Domain\Pim\DestinationPim))

2 /home/akeneo/transporteo/src/Domain/Command/ChainedConsole.php(23): Akeneo\PimMigration\Infrastructure\Cli\LocalConsole->execute(Object(Akeneo\PimMigration\Domain\Command\MySqlExecuteCommand), Object(Akeneo\PimMigration\Domain\Pim\DestinationPim))

3 /home/akeneo/transporteo/src/Domain/MigrationStep/s080_FamilyMigration/FamilyDataMigrator.php(56): Akeneo\PimMigration\Domain\Command\C in /home/akeneo/transporteo/src/Infrastructure/Cli/LocalMySqlQueryExecutor.php on line 30

During the migration process, a client identified a request from the ALTER TABLE that blocks Transporteo (here is the complete request: ALTER TABLE akeneo_pim.pim_catalog_family ADD COLUMN image_attribute_id INT(11) DEFAULT NULL AFTER label_attribute_id, ADD CONSTRAINT FK_90632072BC295696 FOREIGN KEY (image_attribute_id) REFERENCES pim_catalog_attribute (id) ON DELETE SET NULL, ADD KEY IDX_90632072BC295696 (image_attribute_id))

LaurentPetard commented 6 years ago

The query is valid. Maybe the migration the table pim_catalog_family failed, but it would threw an error.

We would need the SQL error to investigate.

LaureBrosseau commented 6 years ago

when we run this request manually in MySQL we do not get any error, it seems to be executed fine