# Fehler bei "Datenbank Migration" von Update EA2 auf RC2

**URL:** https://forum.shopware.com/t/fehler-bei-datenbank-migration-von-update-ea2-auf-rc2/63534
**Category:** Allgemein
**Created:** [13. Dezember 2019 um 13:47 UTC](https://forum.shopware.com/t/fehler-bei-datenbank-migration-von-update-ea2-auf-rc2/63534 "2019-12-13T13:47:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![muellerchristoph](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@muellerchristoph](https://forum.shopware.com/u/muellerchristoph)
#### Post date: [13. Dezember 2019 um 13:47 UTC](https://forum.shopware.com/t/fehler-bei-datenbank-migration-von-update-ea2-auf-rc2/63534/1 "2019-12-13T13:47:08Z")

</div>

Hallo,

ich erhalte folgende&nbsp;Fehlermeldung&nbsp;im Schritt “Datenbank Migration”  
&nbsp;

```
Error

Received the following error message:
An exception occurred while executing ' CREATE TABLE `product_export` ( `id` BINARY(16) NOT NULL, `product_stream_id` BINARY(16) NOT NULL, `storefront_sales_channel_id` BINARY(16) NULL, `sales_channel_id` BINARY(16) NOT NULL, `sales_channel_domain_id` BINARY(16) NULL, `file_name` VARCHAR(255) NOT NULL, `access_key` VARCHAR(255) NOT NULL, `encoding` VARCHAR(255) NOT NULL, `file_format` VARCHAR(255) NOT NULL, `include_variants` TINYINT(1) NULL DEFAULT '0', `generate_by_cronjob` TINYINT(1) NOT NULL DEFAULT '0', `generated_at` DATETIME(3) NULL, `interval` INT(11) NOT NULL, `header_template` LONGTEXT NULL, `body_template` LONGTEXT NULL, `footer_template` LONGTEXT NULL, `created_at` DATETIME(3) NOT NULL, `updated_at` DATETIME(3) NULL, PRIMARY KEY (`id`), UNIQUE KEY `file_name` (`file_name`), KEY `fk.product_export.product_stream_id` (`product_stream_id`), KEY `fk.product_export.storefront_sales_channel_id` (`storefront_sales_channel_id`), KEY `fk.product_export.sales_channel_id` (`sales_channel_id`), KEY `fk.product_export.sales_channel_domain_id` (`sales_channel_domain_id`), CONSTRAINT `fk.product_export.product_stream_id` FOREIGN KEY (`product_stream_id`) REFERENCES `product_stream` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk.product_export.storefront_sales_channel_id` FOREIGN KEY (`storefront_sales_channel_id`) REFERENCES `sales_channel` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk.product_export.sales_channel_id` FOREIGN KEY (`sales_channel_id`) REFERENCES `sales_channel` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk.product_export.sales_channel_domain_id` FOREIGN KEY (`sales_channel_domain_id`) REFERENCES `sales_channel_domain` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ': SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'product_export' already exists

Please try to fix this error and restart the update.

Response

{"valid":false,"errorMsg":"An exception occurred while executing '\n CREATE TABLE `product_export` (\n `id` BINARY(16) NOT NULL,\n `product_stream_id` BINARY(16) NOT NULL,\n `storefront_sales_channel_id` BINARY(16) NULL,\n `sales_channel_id` BINARY(16) NOT NULL,\n `sales_channel_domain_id` BINARY(16) NULL,\n `file_name` VARCHAR(255) NOT NULL,\n `access_key` VARCHAR(255) NOT NULL,\n `encoding` VARCHAR(255) NOT NULL,\n `file_format` VARCHAR(255) NOT NULL,\n `include_variants` TINYINT(1) NULL DEFAULT '0',\n `generate_by_cronjob` TINYINT(1) NOT NULL DEFAULT '0',\n `generated_at` DATETIME(3) NULL,\n `interval` INT(11) NOT NULL,\n `header_template` LONGTEXT NULL,\n `body_template` LONGTEXT NULL,\n `footer_template` LONGTEXT NULL,\n `created_at` DATETIME(3) NOT NULL,\n `updated_at` DATETIME(3) NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `file_name` (`file_name`),\n KEY `fk.product_export.product_stream_id` (`product_stream_id`),\n KEY `fk.product_export.storefront_sales_channel_id` (`storefront_sales_channel_id`),\n KEY `fk.product_export.sales_channel_id` (`sales_channel_id`),\n KEY `fk.product_export.sales_channel_domain_id` (`sales_channel_domain_id`),\n CONSTRAINT `fk.product_export.product_stream_id` FOREIGN KEY (`product_stream_id`) REFERENCES `product_stream` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n CONSTRAINT `fk.product_export.storefront_sales_channel_id` FOREIGN KEY (`storefront_sales_channel_id`) REFERENCES `sales_channel` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n CONSTRAINT `fk.product_export.sales_channel_id` FOREIGN KEY (`sales_channel_id`) REFERENCES `sales_channel` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,\n CONSTRAINT `fk.product_export.sales_channel_domain_id` FOREIGN KEY (`sales_channel_domain_id`) REFERENCES `sales_channel_domain` (`id`) ON DELETE CASCADE ON UPDATE CASCADE\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n ':\n\nSQLSTATE[42S01]: Base table or view already exists: 1050 Table 'product_export' already exists"}

```

&nbsp;

---

<div class="post-metadata">

### Author: ![muellerchristoph](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@muellerchristoph](https://forum.shopware.com/u/muellerchristoph)
#### Post date: [13. Dezember 2019 um 13:51 UTC](https://forum.shopware.com/t/fehler-bei-datenbank-migration-von-update-ea2-auf-rc2/63534/2 "2019-12-13T13:51:13Z")

</div>

Ich habe anschließend&nbsp;die Tabelle ‘product\_export’ gelöscht und nun folgende Fehlermeldung erhalten:

```
Error
Received the following error message:
An exception occurred while executing 'INSERT INTO sales_channel_type (id, icon_name, created_at) VALUES (?, ?, ?)' with params ["\xed\x53\x5e\x57\x22\x13\x4a\xc1\xaa\x65\x24\xf7\x3e\x26\x88\x1b", "default-object-rocket", "2019-12-13 14:50:05.000"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '\xEDS^W"\x13J\xC1\xAAe$\xF7>&\x88\x1B' for key 'PRIMARY'

Please try to fix this error and restart the update.
Response
{"valid":false,"errorMsg":"An exception occurred while executing 'INSERT INTO sales_channel_type (id, icon_name, created_at) VALUES (?, ?, ?)' with params [\"\\xed\\x53\\x5e\\x57\\x22\\x13\\x4a\\xc1\\xaa\\x65\\x24\\xf7\\x3e\\x26\\x88\\x1b\", \"default-object-rocket\", \"2019-12-13 14:50:05.000\"]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '\\xEDS^W\"\\x13J\\xC1\\xAAe$\\xF7>&\\x88\\x1B' for key 'PRIMARY'"}

```

&nbsp;

---

<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: [13. Dezember 2019 um 13:53 UTC](https://forum.shopware.com/t/fehler-bei-datenbank-migration-von-update-ea2-auf-rc2/63534/3 "2019-12-13T13:53:20Z")

</div>

```
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 

```

Eintrag existiert schon in&nbsp;sales\_channel\_type wo icon\_name ist&nbsp;“default-object-rocket”

---

<div class="post-metadata">

### Author: ![muellerchristoph](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@muellerchristoph](https://forum.shopware.com/u/muellerchristoph)
#### Post date: [13. Dezember 2019 um 13:57 UTC](https://forum.shopware.com/t/fehler-bei-datenbank-migration-von-update-ea2-auf-rc2/63534/4 "2019-12-13T13:57:26Z")

</div>

Habe ich auch gelöscht und erhalte anschließend:

&nbsp;

```
Error
Received the following error message:
An exception occurred while executing 'INSERT INTO sales_channel_type_translation (sales_channel_type_id, language_id, name, manufacturer, description, created_at) VALUES (?, ?, ?, ?, ?, ?)' with params ["\xed\x53\x5e\x57\x22\x13\x4a\xc1\xaa\x65\x24\xf7\x3e\x26\x88\x1b", "", "Produktvergleich", "shopware AG", "Verkaufskanal f\u00fcr Produktvergleichsportale", "2019-12-13 14:56:19.000"]: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`shopware`.`sales_channel_type_translation`, CONSTRAINT `fk.sales_channel_type_translation.language_id` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`) ON DELETE CASCADE ON UPDATE CAS)

Please try to fix this error and restart the update.
Response
{"valid":false,"errorMsg":"An exception occurred while executing 'INSERT INTO sales_channel_type_translation (sales_channel_type_id, language_id, name, manufacturer, description, created_at) VALUES (?, ?, ?, ?, ?, ?)' with params [\"\\xed\\x53\\x5e\\x57\\x22\\x13\\x4a\\xc1\\xaa\\x65\\x24\\xf7\\x3e\\x26\\x88\\x1b\", \"\", \"Produktvergleich\", \"shopware AG\", \"Verkaufskanal f\\u00fcr Produktvergleichsportale\", \"2019-12-13 14:56:19.000\"]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`shopware`.`sales_channel_type_translation`, CONSTRAINT `fk.sales_channel_type_translation.language_id` FOREIGN KEY (`language_id`) REFERENCES `language` (`id`) ON DELETE CASCADE ON UPDATE CAS)"}

```

&nbsp;

---

<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: [13. Dezember 2019 um 14:29 UTC](https://forum.shopware.com/t/fehler-bei-datenbank-migration-von-update-ea2-auf-rc2/63534/5 "2019-12-13T14:29:52Z")

</div>

```
 SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails 

```

Ich denke mal mit deinen löschaktionen geht mehr kaputt als repariert wird. Hier fehlen jetzt die Verknüpfungen.
