# Migration mit EA1.1

**URL:** <https://forum.shopware.com/t/migration-mit-ea1-1/61485>\
**Category:** Allgemein\
**Created:** [3. September 2019 um 06:28 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485 "2019-09-03T06:28:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Urs\_Landis](https://avatars.discourse-cdn.com/v4/letter/u/3be4f8/32.png) [@Urs\_Landis](https://forum.shopware.com/u/Urs_Landis)\
**Post date:** [3. September 2019 um 06:28 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485/1 "2019-09-03T06:28:36Z")

</div>

Hallo

SW6 neu installiert und Daten von SW5 migriert. Leider sind alle Artikel keiner Kategorie mehr zugeordnet und wenn ich sie von Hand zuordne kann ich sie im FE nicht öffnen, wird angezeigt aber wenn ich darauf klicke kommt nur ein „Leider ist etwas schief gelaufen“ mit einem Error 500. Mit EA1 hatte ich da keine Probleme…

Was ist da schief gelaufen? Gute Ideen?

&nbsp;

Grüsse

Urs

---

<div class="post-metadata">

**Author:** ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)\
**Post date:** [3. September 2019 um 06:36 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485/2 "2019-09-03T06:36:20Z")

</div>

Guten Morgen,

hast du schon mal in die Tabelle “swag\_migration\_logging” geschaut, oder in den&nbsp;History-Tab des Migrationsassistenten, welche Fehler dort aufgefallen sind?  
Ansonsten wäre noch eine Idee, die Indexierung nochmal von Hand anzustoßen per CLI: “bin/console dal:refresh:index”.

Gruß

Krispin

---

<div class="post-metadata">

**Author:** ![Urs\_Landis](https://avatars.discourse-cdn.com/v4/letter/u/3be4f8/32.png) [@Urs\_Landis](https://forum.shopware.com/u/Urs_Landis)\
**Post date:** [3. September 2019 um 07:28 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485/3 "2019-09-03T07:28:41Z")

</div>

Da hab ich so&nbsp;53924&nbsp;Fehler&nbsp; ![Wearing-Sunglasses](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/301eaa4db0af1251d93dae7904e5b71a4b15e729.png "Wearing-Sunglasses")

Ich schau mir mal einige an…

---

<div class="post-metadata">

**Author:** ![Urs\_Landis](https://avatars.discourse-cdn.com/v4/letter/u/3be4f8/32.png) [@Urs\_Landis](https://forum.shopware.com/u/Urs_Landis)\
**Post date:** [3. September 2019 um 07:31 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485/4 "2019-09-03T07:31:39Z")

</div>

Von denen hat es SEHR viele…

Ich glaub ich lösch das nochmals und starte neu…

Entity: product, sourceId: 095f5869b1ec4573ad6c5f80fa7fc5bc  
An exception occurred while executing ‘INSERT INTO `product_visibility` (`id`, `product_id`, `product_version_id`, `sales_channel_id`, `visibility`, `created_at`) VALUES (?, ?, ?, ?, ?, ?)’ with params ["\x2d\x6d\xc6\xe7\xd4\xa4\x40\x54\xa3\x39\x37\x45\x6f\xb4\x1a\x60", “\xaf\x7a\xce\x18\x68\xa1\x41\x97\xb6\xda\xb7\xc5\xe8\xc5\xdd\xce”, “\x0f\xa9\x1c\xe3\xe9\x6a\x4b\xc2\xbe\x4b\xd9\xce\x75\x2c\x34\x25”, “\xbd\x29\xf0\x87\xc0\x53\x45\xe3\x9a\x82\x62\x20\x09\xd1\x92\x62”, 30, “2019-08-29 06:01:53.300”]:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`shoppet_neu`.`product_visibility`, CONSTRAINT `fk.product_visibility.sales_channel_id` FOREIGN KEY (`sales_channel_id`) REFERENCES `sales_channel` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)

---

<div class="post-metadata">

**Author:** ![Urs\_Landis](https://avatars.discourse-cdn.com/v4/letter/u/3be4f8/32.png) [@Urs\_Landis](https://forum.shopware.com/u/Urs_Landis)\
**Post date:** [3. September 2019 um 07:54 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485/5 "2019-09-03T07:54:23Z")

</div>

Habe gerade noch ein anderes Problem in unserer SW5 Datenbank gefunden…

Wir haben einige (127) Datensätze in articles\_details welche keinen Datensatz in Articles mehr haben.&nbsp;

Kann ich die mittels&nbsp;

```
 DELETE from s\_articles\_details WHERE articleID Not IN (Select id from s\_articles)

```

löschen?

Oder kriege ich dann ein anderes Problem?

Und bei den Bildern wird es ja dann wohl auch noch überzählige haben…

---

<div class="post-metadata">

**Author:** ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)\
**Post date:** [3. September 2019 um 08:08 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485/6 "2019-09-03T08:08:47Z")

</div>

> [@Urs Landis schrieb:](https://forum.shopware.com/profile/13809/Urs%20Landis "Urs%20Landis")
> 
> Habe gerade noch ein anderes Problem in unserer SW5 Datenbank gefunden…
> 
> Wir haben einige (127) Datensätze in articles\_details welche keinen Datensatz in Articles mehr haben.&nbsp;
> 
> Kann ich die mittels&nbsp;
> 
> DELETE from s\_articles\_details WHERE articleID Not IN (Select id from s\_articles)
> 
> löschen?
> 
> Oder kriege ich dann ein anderes Problem?
> 
> Und bei den Bildern wird es ja dann wohl auch noch überzählige haben…

&nbsp;Generell ist es immer gut, wenn nicht mehr benötigte Daten gelöscht werden. Würde aus meiner Sicht auch sagen, dass es hier nicht zu Fehlern kommen könnte. Du solltest aber natürlich vorher eine Datenbanksicherung machen, sodass du den alten Datenstand wieder wiederherstellen kannst, wenn es nötig ist.

> [@Urs Landis schrieb:](https://forum.shopware.com/profile/13809/Urs%20Landis "Urs%20Landis")
> 
> Von denen hat es SEHR viele…
> 
> Ich glaub ich lösch das nochmals und starte neu…
> 
> Entity: product, sourceId: 095f5869b1ec4573ad6c5f80fa7fc5bc  
> An exception occurred while executing ‚INSERT INTO `product_visibility` (`id`, `product_id`, `product_version_id`, `sales_channel_id`, `visibility`, `created_at`) VALUES (?, ?, ?, ?, ?, ?)‘ with params [„\x2d\x6d\xc6\xe7\xd4\xa4\x40\x54\xa3\x39\x37\x45\x6f\xb4\x1a\x60“, „\xaf\x7a\xce\x18\x68\xa1\x41\x97\xb6\xda\xb7\xc5\xe8\xc5\xdd\xce“, „\x0f\xa9\x1c\xe3\xe9\x6a\x4b\xc2\xbe\x4b\xd9\xce\x75\x2c\x34\x25“, „\xbd\x29\xf0\x87\xc0\x53\x45\xe3\x9a\x82\x62\x20\x09\xd1\x92\x62“, 30, „2019-08-29 06:01:53.300“]:
> 
> SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`shoppet_neu`.`product_visibility`, CONSTRAINT `fk.product_visibility.sales_channel_id` FOREIGN KEY (`sales_channel_id`) REFERENCES `sales_channel` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)

Das hört sich so an, als ob der dazugehörige SalesChannel nicht erstellt werden konnte und somit der Fremdschlüssel nicht gesetzt werden konnte.  
Dazu sollte auch ein Fehler in der Logging-Tabelle stehen, wenn du diesen lösen kannst, werden sich die anderen Fehler&nbsp;wahrscheinlich auch lösen

Gruß

Krispin

---

<div class="post-metadata">

**Author:** ![Urs\_Landis](https://avatars.discourse-cdn.com/v4/letter/u/3be4f8/32.png) [@Urs\_Landis](https://forum.shopware.com/u/Urs_Landis)\
**Post date:** [4. September 2019 um 07:08 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485/7 "2019-09-04T07:08:32Z")

</div>

Ich habe das ganze SW6 nochmals gelöscht und neu installiert. Nun sieht es wesentlich besser aus, aber ich habe im FE immer noch keine Artikel.

Sobald ich im BE einen Artikel öffne und speichere, ohne etwas zu ändern, erscheint er im FE…

---

<div class="post-metadata">

**Author:** ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)\
**Post date:** [4. September 2019 um 07:17 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485/8 "2019-09-04T07:17:06Z")

</div>

Guten Morgen,

das ist zur Zeit noch ein Problem: Es werden die Indexer im Hintergrund angesprochen, aber es kann zu einem Timeout führen, sodass nicht der komplette Index aktualisiert wird.  
Wenn sowas passiert musst du nur per CLI die Indexer nochmal neu anstoßen. CLI-Command: bin/console dal:refresh:index  
Danach sollten alle Produkte in der Storefront angezeigt werden.

Gruß

Krispin

---

<div class="post-metadata">

**Author:** ![Urs\_Landis](https://avatars.discourse-cdn.com/v4/letter/u/3be4f8/32.png) [@Urs\_Landis](https://forum.shopware.com/u/Urs_Landis)\
**Post date:** [4. September 2019 um 07:32 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485/9 "2019-09-04T07:32:18Z")

</div>

Danke schön!

Gibt es eine Liste mit all den CLI-Commands?

---

<div class="post-metadata">

**Author:** ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)\
**Post date:** [4. September 2019 um 07:54 UTC](https://forum.shopware.com/t/migration-mit-ea1-1/61485/10 "2019-09-04T07:54:46Z")

</div>

Guten Morgen,

gib einfach bin/console in die Console ein, dann werden dir alle CLI-Commands angezeigt 😉

Gruß

Krispin
