magento / data-migration-tool

Magento Data Migration Tool
https://devdocs.magento.com/guides/v2.3/migration/bk-migration-guide.html
Open Software License 3.0
336 stars 200 forks source link

Delta Migration on 2.3.3 not keeping sequence product / sequence catalog category updated #771

Closed not-art closed 4 years ago

not-art commented 4 years ago

Preconditions

  1. Migrating from M1 Commerce 1.14.4.3 to M2 Commerce 2.3.3 (with supplemental 2.3.3 patches)
  2. Running deltas on an M1 store that's continuing to take orders while the M2 store is still not go-live

Steps to reproduce

  1. Migrate initial data
  2. Make some category / product changes in M1, including adding a new category
  3. Run delta migrations
  4. Look at the entries in sequence_catalog_category and sequence_product and notice they don't sync up with the total records in their respective catalog_category / catalog_product entity tables.

Expected result

  1. You should see entries for each product/category in the sequence tables

Actual result

  1. You seem to only see an entry for the most recently migrated category / product.

WHY this is an issue

  1. If there's ever any issue with the url rewrites (we've had a lot of FK failures with the URL Rewrite delta), you often need to go to the community for an extension to regenerate your URL rewrites, or you need to save each category one at a time to re-generate their rewrites.

However, the table that indexes category/product url rewrites (catalog_url_rewrite_product_category) has a FK on the sequence_product entries, and a FK on the url_rewriteid column. Thus, unless the data migration tool is creating entries for each entity in their respective "sequence" table, at least for products give the FK to the sequence_product table, we're unable to re-generate url rewrites, ever, since the tool is only migrating the most-recent entity into the sequence table, not every entity migrated.

In the meantime, we're getting around this issue by inserting the missing sequence ids after each delta, and regenerating url rewrites afterward.

Desired result of this ticket

  1. Update the data migration tool to maintain a 1-to-1 mapping of migrated categories/products, given these FK relations for URL rewrites, or remove the FK constraint on the catalog_url_rewrite_product_category
victor-v-rad commented 4 years ago

Hi @not-art

Thank you for reporting this issue. Since you use M2 commerce it would be great if you post this issue on https://magento.zendesk.com/ as well. This should be a faster way to process this issue.

not-art commented 4 years ago

Can do, Victor. I had assumed you were the only developer maintaining the migration tool, hence why I posted it here. I'll duplicate my bug submission in the enterprise support queue.

not-art commented 4 years ago

I've submitted the Magento Commerce support ticket, Victor. If you no longer need this thread open as a duplicate, you're free to close it. I've tracked the same details I reported here on the EE ticket.

victor-v-rad commented 4 years ago

Thank you @not-art

internal ticket MC-30877 to process this issue

victor-v-rad commented 4 years ago

Thank you @not-art again for reporting this issue good described issue. It should be fixed in cd1455f commit

victor-v-rad commented 4 years ago

The fix released in DMT 2.3.5