# Migration von xtc nach shopware 5

**URL:** <https://forum.shopware.com/t/migration-von-xtc-nach-shopware-5/53511>\
**Category:** Installation/Einstieg\
**Created:** [15. Juni 2018 um 12:15 UTC](https://forum.shopware.com/t/migration-von-xtc-nach-shopware-5/53511 "2018-06-15T12:15:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mercator](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@Mercator](https://forum.shopware.com/u/Mercator)\
**Post date:** [15. Juni 2018 um 12:15 UTC](https://forum.shopware.com/t/migration-von-xtc-nach-shopware-5/53511/1 "2018-06-15T12:15:30Z")

</div>

Hallo liebes Forum

Das ist mein erster Beitrag hier im Forum und zugleich auch mein erstes Problem. Wie im Titel beschrieben versuche ich von einer älteren xtc Version auf die neuste Shopware Version zu migrieren. Während der Produkteimport noch halbwegs klappte, erhalte ich beim Kundenimport eine Fehlermeldung, welche ich nicht ganz verstehe.

```
Beim Importieren der Kunden ist ein Fehler aufgetreten

Code : 23000
Line : 224
File : /home/www/web282/html/shopware/engine/Library/Zend/Db/Statement/Pdo.php

Error : SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`shopware`.`s_user_addresses`, CONSTRAINT `s_user_addresses_ibfk_1` FOREIGN KEY (`country_id`) REFERENCES `s_core_countries` (`id`) ON UPDATE CASCADE)
Trace : #0 /home/www/web282/html/shopware/engine/Library/Zend/Db/Statement.php(297): Zend_Db_Statement_Pdo->_execute(Array) #1 /home/www/web282/html/shopware/engine/Library/Zend/Db/Adapter/Abstract.php(470): Zend_Db_Statement->execute(Array) #2 /home/www/web282/html/shopware/engine/Library/Zend/Db/Adapter/Pdo/Abstract.php(232): Zend_Db_Adapter_Abstract->query('INSERT INTO s_u...', Array) #3 /home/www/web282/html/shopware/engine/Library/Enlight/Components/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO s_u...', Array) #4 /home/www/web282/html/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/CustomerImporter.php(641): Enlight_Components_Db_Adapter_Pdo_Mysql->query('INSERT INTO s_u...') #5 /home/www/web282/html/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/CustomerImporter.php(312): Shopware\SwagMigration\Components\DbServices\Import\CustomerImporter->createOrUpdate(Array, 's_user_addresse...', 'address_id', Array) #6 /home/www/web282/html/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/DbServices/Import/Import.php(176): Shopware\SwagMigration\Components\DbServices\Import\CustomerImporter->import(Array) #7 /home/www/web282/html/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Import/Resource/Customer.php(207): Shopware\SwagMigration\Components\DbServices\Import\Import->customer(Array) #8 /home/www/web282/html/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Components/Migration/Import/Resource/Customer.php(82): Shopware\SwagMigration\Components\Migration\Import\Resource\Customer->migrateCustomer(Array, Object(Shopware\SwagMigration\Components\DbServices\Import\Import), '') #9 /home/www/web282/html/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(444): Shopware\SwagMigration\Components\Migration\Import\Resource\Customer->run() #10 /home/www/web282/html/shopware/engine/Shopware/Plugins/Community/Backend/SwagMigration/Controllers/Backend/SwagMigration.php(479): Shopware_Controllers_Backend_SwagMigration->runImport('import_customer...') #11 /home/www/web282/html/shopware/engine/Library/Enlight/Controller/Action.php(193): Shopware_Controllers_Backend_SwagMigration->importAction() #12 /home/www/web282/html/shopware/engine/Library/Enlight/Con

```

Könnt ihr mir vielleicht einen Tipp geben, weshalb hier der Import abbricht?

Besten Dank und LG

Patrik

---

<div class="post-metadata">

**Author:** ![kulli](https://avatars.discourse-cdn.com/v4/letter/k/a3d4f5/32.png) [@kulli](https://forum.shopware.com/u/kulli)\
**Post date:** [16. Juni 2018 um 15:06 UTC](https://forum.shopware.com/t/migration-von-xtc-nach-shopware-5/53511/2 "2018-06-16T15:06:35Z")

</div>

benutze mal oben rechts die forensuche mit “foreign key constraint fails”

---

<div class="post-metadata">

**Author:** ![Mercator](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@Mercator](https://forum.shopware.com/u/Mercator)\
**Post date:** [3. August 2018 um 18:13 UTC](https://forum.shopware.com/t/migration-von-xtc-nach-shopware-5/53511/3 "2018-08-03T18:13:00Z")

</div>

Besten Dank für die Antwort und den Hinweis. Leider haben mich die Lösungsansätze jedoch nicht weiter gebracht. Ich bin dabei auch wie in der Anleitung unter [https://community.shopware.com/Foreign-Keys-reparieren\_detail\_954.html](https://community.shopware.com/Foreign-Keys-reparieren_detail_954.html)&nbsp; vorgegangen. Sobald ich jedoch erneut das Migrationstool aufrufe, erhalte ich erneut die oben genannte Fehlermeldung. ![Crying](https://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/crying.png "Crying")

Vieleicht noch jemand eine andere Idee welche ich testen könnte?
