# Migration Checksum - Produkttitle

**URL:** <https://forum.shopware.com/t/migration-checksum-produkttitle/105643>\
**Category:** Shopware 6 (German)\
**Created:** [24. Oktober 2024 um 09:12 UTC](https://forum.shopware.com/t/migration-checksum-produkttitle/105643 "2024-10-24T09:12:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [24. Oktober 2024 um 09:12 UTC](https://forum.shopware.com/t/migration-checksum-produkttitle/105643/1 "2024-10-24T09:12:26Z")

</div>

tldr; Foregin key problem bei product\_translation

Im SW5 Shop gibt es ein Sprachenproblem mit den Produkten.  
Bei der Migration wurden die falschen Namen und Description übernommen.

Also habe ich die checksum = NULL gesetzt in der Hoffung, dass Produktname und Description neu überschrieben wird. Leider nicht.

Jetzt habe ich eine SQL mit der ich fehlende name aus der swag\_migrations\_data ziehe und sie in die product\_translation setzen will WENN sie nicht schon vorhanden sind.

Mein Script sagt aber foreign key fehler. Warum?

```auto
INSERT INTO product_translation (product_id, product_version_id, language_id, name)
SELECT smm.entity_uuid, 
       UNHEX('0fa91ce3e96a4bc2be4bd9ce752c3425'), 
       UNHEX('2fbb5fe2e29a4d70aa5854ce7ce3e20b'), 
       JSON_UNQUOTE(JSON_EXTRACT(smd.raw, '$.name'))
FROM swag_migration_data AS smd
LEFT JOIN swag_migration_mapping AS smm ON smm.id = smd.mapping_uuid
LEFT JOIN product_translation AS pt ON pt.product_id = smm.entity_uuid
WHERE smm.checksum IS NULL 
  AND smm.entity = 'product'
  AND pt.product_id IS NULL;

```

Fehler:

```auto
#1452 - Kann Kind-Zeile nicht hinzufügen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (`xxx`.`product_translation`, CONSTRAINT `fk.product_translation.product_id` FOREIGN KEY (`product_id`, `product_version_id`) REFERENCES `product` (`id`, `version_id`) ON DELETE CASCADE ON)

```

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [24. Oktober 2024 um 09:58 UTC](https://forum.shopware.com/t/migration-checksum-produkttitle/105643/2 "2024-10-24T09:58:35Z")

</div>

Habe mich mit LIMIT herangetastet. 1 von 544 Produkt will nicht.  
Funktioniert also, bis auf eines.
