1

I'm migrating from an SQL source in a D8 commerce site. Presently, I'm working on product and inventory data. I have one migration for product variations, one for products, and then 6 additional migrations for inventory tables all in a single migration group. (Inventory data migrations are dependent on the product/variation migrations.) Everything works properly when I run the migrations individually.

However, I have a strange problem when I run drush migrate-import --group=my_inventory_group --execute-dependencies. The migration runs fully and reports that everything is OK. I get all the inventory data, products, and variations, but the commerce_product__variations table gets only a single record added, instead of the 1510 records it should have. That record references the first product item in my source data and one of its variations.

What works for me is executing the product and variation migrations individually, and then the rest of the group.

drush migrate-import my_variation_migration
drush migrate-import my_product_migration  
drush migrate-import --group=my_inventory_group --execute-dependencies

Why can't I execute the migration for the entire migration group with the single command?

1 Answer 1

1

Perhaps https://www.drupal.org/node/2830357 comes into play here? Apart from that, the usual use of --execute-dependencies is to migrate a single migration making sure any migrations it depends on have been executed, the group scenario hasn't been tested so there may be some broken assumption in the code.

0

Your Answer

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