I'm having difficulties in exporting all products with their categories from Magento v2.1.9 installation for importing them to Magento v2.3.0.
Because I don't need all other tables I don't want to use the same database and actually I'm not sure even if I use the old database for the new installation I wouldn't miss some tables that are introduced in v2.3.0.
What I have tried so far is exporting tables matching the pattern
catalog* and try to import them to the new database but doing so it complains about some foreign keys that are related to product attributes.
So how can I cleanly export all products, their categories and attributes and all data related to this entity?
The error is:
ERROR 1005 (HY000) at line 154: Can't create table `****`.`catalogrule_customer_group` (errno: 150 "Foreign key constraint is incorrectly formed")
that by gathering more information from
show engine innodb status;:
2019-03-13 11:25:45 0x7f6a74069700 Error in foreign key constraint of table `****`.`catalogrule_customer_group`:
FOREIGN KEY (`customer_group_id`) REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Catalog Rules To Customer Groups Relations'
I found that
customer_group_id column data type differs from
customer_group_id column. The former is
unsigned int and the latter is
So up to now I'm ensured the differences between both versions isn't tied to tables to be less or more but also tables structures. There are two problems here:
Resolving the given error wouldn't guarantee no further errors while importing.
I shouldn't import
catalogrule_customer_groupbecause I don't have
customer*tables of old database in place.
So the question remains as is. How could someone export products and all their related data to be used for a future import (into v2.3.* to be more specific)?