Magento – magento migration tool migrate:data errors

magento2magento2-migration-tool

When I run migrate:data I get some errors, any way to fix this?

[2017-03-06 17:00:38][ERROR]: Foreign key (FK_CATALOG_COMPARE_ITEM_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID) constraint fails. Orphan records id: 0 from `catalog_compare_item`.`customer_id` has no referenced records in `customer_entity`
[2017-03-06 17:00:38][ERROR]: Foreign key (FK_CATALOG_EAV_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID) constraint fails. Orphan records id: 903 from `catalog_eav_attribute`.`attribute_id` has no referenced records in `eav_attribute`
[2017-03-06 17:00:38][ERROR]: Foreign key (FK_CAT_PRD_ENTT_INT_ATTR_ID_EAV_ATTR_ATTR_ID) constraint fails. Orphan records id: 903 from `catalog_product_entity_int`.`attribute_id` has no referenced records in `eav_attribute`
[2017-03-06 17:00:38][ERROR]: Foreign key (FK_EAV_ATTRIBUTE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID) constraint fails. Orphan records id: 19,21 from `eav_attribute`.`entity_type_id` has no referenced records in `eav_entity_type`
[2017-03-06 17:00:38][ERROR]: Foreign key (FK_EAV_ATTR_SET_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID) constraint fails. Orphan records id: 19,21 from `eav_attribute_set`.`entity_type_id` has no referenced records in `eav_entity_type`
[2017-03-06 17:00:38][ERROR]: Foreign key (FK_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID) constraint fails. Orphan records id: 202,213,706,732,903,2712 from `eav_entity_attribute`.`attribute_id` has no referenced records in `eav_attribute`

and this is another one

[2017-03-06 17:00:42][ERROR]: Source documents are not mapped: paybox_question_number,strikeiron_tax_rate

Best Answer

First problem: Foreign key (fk_...) constraint fails. Orphan records id: ...

What does it mean?

  • You have orphan records in your database. This means that a foreign key is referencing another item which doens't exist anymore. Check some SQL-Tutorials or documentation to read more about it.

How to solve it:

Second problem: Source documents are not mapped

What does it mean?

  • (I'm not complete sure about this, probably correction needed): You have had different tables that are no more the same, but in a way that the migration tool can't recognize it, as they are customized or extended tables. So in that case you have to check manually whether you want or need to migrate that data aswell or exclude it.

How to solve it:

Related Topic