0

I'm trying to migrate Magento 1.8.1.0 to 2.1.6. when i run data migration, i get the following error:

  • [2017-04-22 20:28:55][INFO][mode: data][stage: integrity check][step: Data Integrity Step]: started
  • [2017-04-22 20:28:56][INFO][mode: data][stage: integrity check][step: EAV Step]: started
  • [2017-04-22 20:28:56][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
  • [2017-04-22 20:28:56][ERROR]: Attribute vat_id does not exist in the type customer_address
  • [2017-04-22 20:28:56][INFO][mode: data][stage: integrity check][step: Map Step]: started
  • [2017-04-22 20:28:58][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
  • [2017-04-22 20:28:58][INFO][mode: data][stage: integrity check][step: Log Step]: started
  • [2017-04-22 20:28:58][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
  • [2017-04-22 20:28:58][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
  • [2017-04-22 20:28:58][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
  • [2017-04-22 20:28:58][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
  • [2017-04-22 20:28:58][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started

i already found this post and found that i already have vat_id in eav_attribute table!!

1 Answer 1

0

The attribute should exist in both eav_attribute and eav_entity_type with relevant attribute types. I guess you do not have a record in eav_entity_type table. You can check it by running following query.

SELECT 
    *
FROM
    eav_entity_type et
        JOIN
    eav_attribute ea ON et.entity_type_id = ea.entity_type_id
WHERE
    et.entity_type_code = 'customer_address' and  ea.attribute_code='vat_id';

-- Update ---

If the above does not return any result run following to add missing record.

INSERT INTO `eav_entity_type`
(`entity_type_id`,
`entity_type_code`,
`entity_model`,
`attribute_model`,
`entity_table`,
`value_table_prefix`,
`entity_id_field`,
`is_data_sharing`,
`data_sharing_key`,
`default_attribute_set_id`,
`increment_model`,
`increment_per_store`,
`increment_pad_length`,
`increment_pad_char`,
`additional_attribute_table`,
`entity_attribute_collection`)
VALUES
('2', 'customer_address', 'customer/address', 'customer/attribute', 'customer/address_entity', NULL, NULL, '1', 'default', '2', NULL, '0', '8', '0', 'customer/eav_attribute', 'customer/address_attribute_collection');
2
  • I'm a newbie when it come SQL, your patience would be greatly appreciated. i run your statement from phpmyadmin but i got #1046 - No database selected so i tried and put the DB name at the left side of the statement to be: SELECT * FROM DBName.eav_entity_type et JOIN eav_attribute ea ON et.entity_type_id = ea.entity_type_id WHERE et.entity_type_code = 'customer_address' and ea.attribute_code='vat_id' and ended up with zero rows
    – S.Mikhail
    Commented Apr 23, 2017 at 18:57
  • i checked using phpmyadmin and i found that the table already have a row with the same info, with the same primary key (2)
    – S.Mikhail
    Commented Apr 24, 2017 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.