# Update auf 5.7.2 schlägt fehl

**URL:** <https://forum.shopware.com/t/update-auf-5-7-2-schlaegt-fehl/89283>\
**Category:** Administration\
**Created:** [21. Juli 2021 um 06:46 UTC](https://forum.shopware.com/t/update-auf-5-7-2-schlaegt-fehl/89283 "2021-07-21T06:46:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![norman.steinbach](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@norman.steinbach](https://forum.shopware.com/u/norman.steinbach)\
**Post date:** [21. Juli 2021 um 06:46 UTC](https://forum.shopware.com/t/update-auf-5-7-2-schlaegt-fehl/89283/1 "2021-07-21T06:46:19Z")

</div>

Hallo Shopware Community,

sowohl über die Web-Oberfläche als auch in der Shell bekomme ich immer die folgende Fehlermeldung beim Versuch, von 5.6.10 auf 5.7.2 zu aktualisieren:

```auto
Apply database migrations...
  0/11 [>---------------------------] 0%
In UpdateCommand.php line 175:
                                                                                                                                       
  Could not apply migration (Migrations_Migration1700). Error: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint  
                                                                                                                                       

In Manager.php line 217:
                                                                                                                                       
  Could not apply migration (Migrations_Migration1700). Error: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint  
                                                                                                                                       

update

```

Und damit ist dann die Site für mich „zerschossen“, d.h. ich kann lediglich nur noch ein Backup einspielen.

Wie behebt man diesen Fehler?

Achso, die SQL-Datei um die Foreign Keys zu reparieren habe ich natürlich auch einzuspielen versucht, da meldet PhpMyAdmin folgendes:

```auto
-- Add missing foreign key
ALTER TABLE `s_customer_streams_attributes`
  ADD CONSTRAINT `s_customer_streams_attributes_ibfk_1` FOREIGN KEY (`streamID`) REFERENCES `s_customer_streams` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION

MySQL meldet: Dokumentation
#1822 - Failed to add the foreign key constaint. Missing index for constraint 's_customer_streams_attributes_ibfk_1' in the referenced table 's_customer_streams'

```

Die Tabelle s\_customer\_streams\_attributes enthält zu dem Zeitpunkt null Datensätze.

Ich würde mich über jegliche Hilfestellung freuen!

Danke & freundliche Grüße.
