DELTA MIGRATION DUPLICATE ENTRY

Hi,

I am trying to run a DELTA MIGRATION for step 7 to import new sales data but I am having this duplicate entry issue.

Thanks,

1 answer

Profile photo of Mall Staff 184060.00 $tone September 2, 2020
Public

Hi there,

I am trying to run a DELTA MIGRATION for step 7 to import new sales data but I am having this duplicate entry issue.

That was because you had checked ‘KEEP ORIGINAL IDs’ settings in step #7 while your M2 had testing data after the first migration.
 
To continue with the delta migration in step #7, you have to delete all testing sales data by following these steps:

1. Run the following SQL queries in your M2 database:

Delete From salesrule Where rule_id NOT IN (Select m2_id From ub_migrate_map_step_7 where entity_name = 'salesrule');
Delete From quote Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_quote where entity_name = 'sales_flat_quote' OR entity_name = 'sales_flat_quote_active');
Delete From quote_item Where item_id NOT IN (Select m2_id From ub_migrate_map_step_7_quote_item where entity_name = 'sales_flat_quote_item');
Delete From quote_address Where address_id NOT IN (Select m2_id From ub_migrate_map_step_7_quote_address where entity_name = 'sales_flat_quote_address');
Delete From sales_order Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_order where entity_name = 'sales_flat_order');
Delete From sales_order_item Where item_id NOT IN (Select m2_id From ub_migrate_map_step_7_order_item where entity_name = 'sales_flat_order_item');
Delete From sales_order_address Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_order_address where entity_name = 'sales_flat_order_address');
Delete From sales_invoice Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_invoice where entity_name = 'sales_flat_invoice');
Delete From sales_invoice_item Where entity_id NOT IN (Select m2_id From ub_migrate_map_step_7_invoice_item where entity_name = 'sales_flat_invoice_item');

2. And then, you continue with the delta migration in step #7. 
And let me to know how it goes then.

Regards,
Mall.

#1

Please login or Register to Submit Answer

Written By

Comments