# Update von 6.3.5.1 auf 6.4.2.1 schlägt fehl mit Datenbank Fehler

**URL:** <https://forum.shopware.com/t/update-von-6-3-5-1-auf-6-4-2-1-schlaegt-fehl-mit-datenbank-fehler/88679>\
**Category:** Administration\
**Tags:** administration\
**Created:** [29. Juni 2021 um 11:03 UTC](https://forum.shopware.com/t/update-von-6-3-5-1-auf-6-4-2-1-schlaegt-fehl-mit-datenbank-fehler/88679 "2021-06-29T11:03:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdgraue](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/bdgraue/32/9920_2.png) [@bdgraue](https://forum.shopware.com/u/bdgraue)\
**Post date:** [29. Juni 2021 um 11:03 UTC](https://forum.shopware.com/t/update-von-6-3-5-1-auf-6-4-2-1-schlaegt-fehl-mit-datenbank-fehler/88679/1 "2021-06-29T11:03:36Z")

</div>

```auto
Error
Received the following error message:
An exception occurred while executing ' CREATE TABLE `currency_country_rounding` ( `id` binary(16) NOT NULL, `currency_id` binary(16) NOT NULL, `country_id` binary(16) NOT NULL, `item_rounding` json NOT NULL, `total_rounding` json NOT NULL, `created_at` datetime(3) NOT NULL, `updated_at` datetime(3) NULL, PRIMARY KEY (`id`), KEY `currency_id` (`currency_id`), KEY `country_id` (`country_id`), CONSTRAINT `currency_country_rounding_ibfk_2` FOREIGN KEY (`currency_id`) REFERENCES `currency` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `currency_country_rounding_ibfk_3` FOREIGN KEY (`country_id`) REFERENCES `country` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ': SQLSTATE[HY000]: General error: 1005 Can't create table `xxxxxxxx_xxx`.`currency_country_rounding` (errno: 150 "Foreign key constraint is incorrectly formed")

Please try to fix this error and restart the update.

```

Wie kann ich hier am Besten weiter fortfahren? Wie behebe ich den Fehler?

---

<div class="post-metadata">

**Author:** ![Pahu](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@Pahu](https://forum.shopware.com/u/Pahu)\
**Post date:** [14. Juli 2021 um 14:35 UTC](https://forum.shopware.com/t/update-von-6-3-5-1-auf-6-4-2-1-schlaegt-fehl-mit-datenbank-fehler/88679/2 "2021-07-14T14:35:53Z")

</div>

Dieser Fehler hat mir die letzten Tage auch viele Nerven gekostet…

Diese Lösung von mir ist ohne gewähr aber so hat lief das update bei mir erfolgreich durch.  
Vor dem Update unbedingt ein Backup machen.

Vor dem Update folgende Tables und Columns in der Datenbank löschen:

- Drop currency\_country\_rounding TABLE
- Drop item\_rounding Column inside currency Table
- Drop total\_rounding Column inside currency Table
- Drop item\_rounding Column inside order Table
- Drop total\_rounding Column inside order Table

Nun sollte das Update auf 6.4.2.1 erfolgreich durchlaufen.

LG

---

<div class="post-metadata">

**Author:** ![SvenReimer](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@SvenReimer](https://forum.shopware.com/u/SvenReimer)\
**Post date:** [20. Juli 2021 um 08:28 UTC](https://forum.shopware.com/t/update-von-6-3-5-1-auf-6-4-2-1-schlaegt-fehl-mit-datenbank-fehler/88679/3 "2021-07-20T08:28:07Z")

</div>

hi, hab das gleiche problem mit dem update. Wo finde ich denn:

```
Drop currency_country_rounding TABLE
Drop item_rounding Column inside currency Table
Drop total_rounding Column inside currency Table
Drop item_rounding Column inside order Table
Drop total_rounding Column inside order Table

```

das alles zum löschen?

---

<div class="post-metadata">

**Author:** ![bdgraue](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/bdgraue/32/9920_2.png) [@bdgraue](https://forum.shopware.com/u/bdgraue)\
**Post date:** [20. Juli 2021 um 08:54 UTC](https://forum.shopware.com/t/update-von-6-3-5-1-auf-6-4-2-1-schlaegt-fehl-mit-datenbank-fehler/88679/4 "2021-07-20T08:54:24Z")

</div>

Das wären SQL Querys die in der Datenbank auszuführen wären. Ich bin mir aber nicht sicher, ob alleine damit das Problem dann behoben ist.  
Bitte solche Manipulationen nur nach vorherigem Backup durchführen.
