Skip to content

Data Migration Error 1.7.0.2 to 2.0 #49

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

Closed
arthurp1114 opened this issue Jan 14, 2016 · 7 comments
Closed

Data Migration Error 1.7.0.2 to 2.0 #49

arthurp1114 opened this issue Jan 14, 2016 · 7 comments

Comments

@arthurp1114
Copy link

I got this error during migrating 1.7.0.2 to 2.0:

[2016-01-14 00:40:47][INFO][mode: data][stage: integrity check][step: EAV Step]: started
100% [============================] Remaining Time: 1 sec
[2016-01-14 00:40:47][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: 1 sec
[2016-01-14 00:40:47][INFO][mode: data][stage: integrity check][step: Map Step]: started
100% [============================] Remaining Time: 1 sec
[2016-01-14 00:40:52][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
100% [============================] Remaining Time: 1 sec
016-01-14 00:40:52][INFO][mode: data][stage: integrity check][step: Log Step]: started
100% [============================] Remaining Time: 1 sec
[2016-01-14 00:40:52][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
100% [============================] Remaining Time: 1 sec
[2016-01-14 00:40:52][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
100% [============================] Remaining Time: 1 sec
[2016-01-14 00:40:52][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
100% [============================] Remaining Time: 1 sec
[2016-01-14 00:40:52][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
100% [============================] Remaining Time: 1 sec
[2016-01-14 00:40:52][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
100% [============================] Remaining Time: 1 sec
[2016-01-14 00:40:52][INFO][mode: data][stage: setup triggers][step: Stage]: started
100% [============================] Remaining Time: 1 sec
[2016-01-14 00:40:53][INFO][mode: data][stage: data migration][step: EAV Step]: started
14% [====>-----------------------] Remaining Time: 1 sec

[PDOException]
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME'

I checked the migration log and there were no specific errors related to this:

[2016-01-13 23:03:42][INFO][mode: data][stage: integrity check][step: EAV Step]: started
[2016-01-13 23:03:43][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
[2016-01-13 23:03:43][INFO][mode: data][stage: integrity check][step: Map Step]: started
[2016-01-13 23:03:48][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
[2016-01-13 23:03:48][INFO][mode: data][stage: integrity check][step: Log Step]: started
[2016-01-13 23:03:48][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
[2016-01-13 23:03:48][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
[2016-01-13 23:03:48][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
[2016-01-13 23:03:48][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
[2016-01-13 23:03:48][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
[2016-01-13 23:03:48][INFO][mode: data][stage: setup triggers][step: Stage]: started
[2016-01-13 23:03:53][INFO][mode: data][stage: data migration][step: EAV Step]: started

Does anyone have any clue about this issue?

Thanks,

Arthur

@arthurp1114 arthurp1114 changed the title Data Migration Error Data Migration Error 1.7.0.2 to 2.0 Jan 14, 2016
@victor-v-rad
Copy link
Collaborator

Hi,

It can occur when you run data migration for the second time. Clean up database of Magento 2 by reinstalling it and make its a mysqldump just in case previous attempt failed. So you can restore DB and retry the migration

@arthurp1114
Copy link
Author

Hello Victor,

Thanks for your help, I have fixed that issue by reinstall the whole DB and magento2. However, I got another error during the data migration:

[ERROR]: Incorrect value: Magento\Catalog\Model\Product\Attribute\Backend\Media in: eav_attribute.backend_model for attribute_code=media_gallery

Does anyone run into this issue and have any idea about what this is? I check the DB data and got this:

mysql> select * from mage_eav_attribute where attribute_code='media_gallery'\G;
*************************** 1. row ***************************
attribute_id: 87
entity_type_id: 4
attribute_code: media_gallery
attribute_model: NULL
backend_model: NULL
backend_type: static
backend_table: NULL
frontend_model: NULL
frontend_input: gallery
frontend_label: Media Gallery
frontend_class: NULL
source_model: NULL
is_required: 0
is_user_defined: 0
default_value: NULL
is_unique: 0
note: NULL

What do I have to put in the "attribute_model"?

Thanks

@binhton
Copy link

binhton commented Jan 16, 2016

I also got the error during data migration from 1.7.0. I have updated map.xml.dist and map-eav.xml.dist to clear all other errors. Please help

[2016-01-16 04:29:12][ERROR]: Incorrect value: Magento\Catalog\Model\Product\Attribute\Backend\Media in: eav_attribute.backend_model for attribute_code=media_gallery

@victor-v-rad
Copy link
Collaborator

Hi,
Most likely the error appears because you use the version of Magento 2 that is based on develop branch from the github. Quote from the documentation

The versions of both the Data Migration Tool and the Magento 2 code must be identical (for example, 2.0.0). To find the version of either package, open /composer.json and find the value of "version".

Please switch to the version of Magento 2 that is supported by Migration Tool

@ilol
Copy link

ilol commented Apr 28, 2016

Hey, did viktor`s suggestion help?
can close the issue?

@arthurp1114
Copy link
Author

This issue has been fixed with Victor's help. Thanks.

@codiax
Copy link

codiax commented May 10, 2016

Hey, I get the same error:

Incorrect value: Magento\Catalog\Model\Product\Attribute\Backend\Media in: eav_attribute.backend_model for attribute_code=media_gallery

The version of magento and migration tool is 2.0.2.
The value of backend_model is NULL.

I don't know how to fix it..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants