# Update von 6.7.6.2 auf 6.7.8.2 endet mit Error 500

**URL:** <https://forum.shopware.com/t/update-von-6-7-6-2-auf-6-7-8-2-endet-mit-error-500/108987>\
**Category:** Shopware 6 (German)\
**Created:** [29. April 2026 um 06:36 UTC](https://forum.shopware.com/t/update-von-6-7-6-2-auf-6-7-8-2-endet-mit-error-500/108987 "2026-04-29T06:36:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [29. April 2026 um 06:36 UTC](https://forum.shopware.com/t/update-von-6-7-6-2-auf-6-7-8-2-endet-mit-error-500/108987/1 "2026-04-29T06:36:42Z")

</div>

Heute einen Test gemacht. Und zwar ein Update-Versuch von 6.7.6.2 auf 6.7.8.2 welches allerdings mit Fehlern und zum Absturz vom Shop führte. Und ja, Plugins waren aktuell, deaktiviert und Cache wurde zuvor auch (manuell) gelöscht.

```auto
Run Post Update
Get collection for identifier: "core"
migrate Migrations
0/19 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% < 1 ms/< 1 ms 40.5 MiB16:37:49 ERROR [app] Migration: "Shopware\Core\Migration\V6_7\Migration1763125891AddProductTypeColumn" failed: "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1553 Cannot drop index '': needed in a foreign key constraint"
 ---------- ---------------------- 
  Action Number of migrations  
 ---------- ---------------------- 
  Migrated 2 out of 19           
 ---------- ---------------------- 
16:37:49 CRITICAL [console] Error thrown while running command "database:migrate core --all=1". Message: "
Migration error: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1553 Cannot drop index '': needed in a foreign key constraint\n

```

```auto
#message: "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1553 Cannot drop index '': needed in a foreign key constraint"
#code: 1553
#file: "/var/.../httpdocs/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php"

```

Alle Updates scheitern an dieser Anpassung:

```auto
class Migration1763125891AddProductTypeColumn extends MigrationStep
{
    public function getCreationTimestamp(): int
    {
        return 1763125891;
    }

    public function update(Connection $connection): void
    {
        if (!TableHelper::columnExists($connection, 'product', 'type')) {
            $this->addColumn(
                $connection,
                'product',
                'type',
                'VARCHAR(32)',
                false,
                '\'physical\''
            );

            $connection->executeStatement('CREATE INDEX `idx.product.type` ON `product` (`type`)');
        }

        $batchSize = 5000;

        do {
            $affected = $connection->executeStatement(
                "UPDATE `product`
                 SET `product`.`type` = 'digital'
                 WHERE JSON_CONTAINS(states, '\"is-download\"')
                 LIMIT {$batchSize};"
            );
        } while ($affected > 0);
    }
}

```

Nachtrag:

Der Shop ist im Frontend und Backend dann nicht mehr erreichbar. Als Fehler wird im Log dies angezeigt:

```auto
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sales_channel_analytics.track_offcanvas_cart' in 'field list'" at ExceptionConverter.php line 63 {"exception":"[object] (Doctrine\\DBAL\\Exception\\InvalidFieldNameException(code: 1054): An exception occurred while executing a query: 
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sales_channel_analytics.track_offcanvas_cart' in 'field list' at /var/.../vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:63)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 1054): 
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sales_channel_analytics.track_offcanvas_cart' in 'field list' at /var/.../vendor/doctrine/dbal/src/Driver/PDO/Exception.php:24)\n[previous exception] [object] (PDOException(code: 42S22): 
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sales_channel_analytics.track_offcanvas_cart' in 'field list' at /var/.../vendor/doctrine/dbal/src/Driver/PDO/Statement.php:55)"} []

```

**Wie kann das sein?**

PS: Diese Fehler wurden übrigens in weiteren Shops auch festgestellt. Also KEIN Einzelfall.

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [29. April 2026 um 07:19 UTC](https://forum.shopware.com/t/update-von-6-7-6-2-auf-6-7-8-2-endet-mit-error-500/108987/2 "2026-04-29T07:19:23Z")

</div>

Das Update scheitert beim Versuch die Spalte ‚type‘ in der Tabelle ‚product‘ anzulegen.

```auto
SQL-Fehler (1553): Cannot drop index '<unknown key name>': needed in a foreign key constraint

```

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [29. April 2026 um 07:50 UTC](https://forum.shopware.com/t/update-von-6-7-6-2-auf-6-7-8-2-endet-mit-error-500/108987/3 "2026-04-29T07:50:10Z")

</div>

Auf GitHub kann dir/allen möglicherweise besser geholfen werden: [Issues · shopware/shopware · GitHub](https://github.com/shopware/shopware/issues)

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [29. April 2026 um 07:52 UTC](https://forum.shopware.com/t/update-von-6-7-6-2-auf-6-7-8-2-endet-mit-error-500/108987/4 "2026-04-29T07:52:33Z")

</div>

Noch besser: Ich schreibe ein Ticket weil es mehrere Shops mit einem SW-Plan betrifft.

---

<div class="post-metadata">

**Author:** ![Malte\_K](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/malte_k/32/25922_2.png) [@Malte\_K](https://forum.shopware.com/u/Malte_K)\
**Post date:** [29. April 2026 um 12:23 UTC](https://forum.shopware.com/t/update-von-6-7-6-2-auf-6-7-8-2-endet-mit-error-500/108987/5 "2026-04-29T12:23:25Z")

</div>

Der genannte Fehler wurde bereits vor ca. zwei Wochen in einem GitHub-Issue gemeldet: [ALTER TABLE product Migrations fail on MySQL 8.4 · Issue #16240 · shopware/shopware · GitHub](https://github.com/shopware/shopware/issues/16240)

Dank des Support-Tickets konnten wir die Ursache etwas besser eingrenzen. Die technische Erklärung findet sich als Kommentar im Issue. Mit einem künftigen Update dürfte das dann auch korrigiert werden.

~~Alternativ kann als Workaround die Datenbankstruktur auch händisch korrigiert werden. Hierzu aber der Hinweis, dass der folgende Datenbankbefehl nur begrenzt getestet wurde und daher **nach Backups und auf eigene Gefahr** angewandt werden sollte. Auch könnte der Name des betroffenen FK in manchen Fällen auch abweichen, was vorher per `SHOW CREATE TABLE product` gegengeprüft werden sollte.~~

EDIT: SQL-Befehl vorerst entfernt, da er nicht ganz zu funktionieren scheint.

EDIT 2: Es wird wohl auch mit diesem MySQL Bug zu tun haben: [https://bugs.mysql.com/bug.php?id=118151](https://bugs.mysql.com/bug.php?id=118151)  
Wenn also MySQL 8.4.5+ verwendet wird, könnte das temporäre Deaktivieren von `restrict_fk_on_non_standard_key` helfen.

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [29. April 2026 um 12:31 UTC](https://forum.shopware.com/t/update-von-6-7-6-2-auf-6-7-8-2-endet-mit-error-500/108987/6 "2026-04-29T12:31:35Z")

</div>

Vom Support habe ich eben die selbe SQL-Anweiseung bekommen, geht aber leider nicht. Selbe Fehlermeldung wie oben schon erwähnt.

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [4. Mai 2026 um 08:53 UTC](https://forum.shopware.com/t/update-von-6-7-6-2-auf-6-7-8-2-endet-mit-error-500/108987/7 "2026-05-04T08:53:51Z")

</div>

Rückmeldung:

Bei MySQL 8.4.x steht ‚restrict\_fk\_on\_non\_standard\_key‘ auf ON ist wohl als zusätzliche Sicherheitssperre zu betrachten (soll wohl bestimmte Fremdschlüssel-Konfigurationen verhindern). Für das Shopware-Update muss dieser Wert auf OFF stehen - global. In der ‚my.cnf‘ sieht es dann so aus:

```
[mysqld]
restrict_fk_on_non_standard_key=0

```

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/2/9/29c7587ba660f00e4995d1743162782e5d6d8653.svg) [@system](https://forum.shopware.com/u/system)\
**Post date:** [3. Juni 2026 um 08:54 UTC](https://forum.shopware.com/t/update-von-6-7-6-2-auf-6-7-8-2-endet-mit-error-500/108987/8 "2026-06-03T08:54:16Z")

</div>

Dieses Thema wurde automatisch 30 Tage nach der letzten Antwort geschlossen. Es sind keine neuen Antworten mehr erlaubt.
