Update auf 6.3.2.0 bricht ab und verbleibt im Wartungsmodus

Bei mir ist das Update von 6.3.1.1 auf 6.3.2.0 auch abgebrochen. Folgender Fehler wurde im Install Wizard angezeigt:

Error
Received the following error message:
An exception occurred while executing ' ALTER TABLE `product_review` ADD CONSTRAINT `fk.product_review.customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) ON DELETE SET NULL ON UPDATE CASCADE ': SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`hepcoshop_sw_bike_prod`.`#sql-6ae_1bdee8`, CONSTRAINT `fk.product_review.customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) ON DELETE SET NULL ON UPDATE CASCADE)

Please try to fix this error and restart the update.
Response
{"valid":false,"errorMsg":"An exception occurred while executing '\n ALTER TABLE `product_review`\n ADD CONSTRAINT `fk.product_review.customer_id`\n FOREIGN KEY (`customer_id`)\n REFERENCES `customer` (`id`)\n ON DELETE SET NULL\n ON UPDATE CASCADE\n ':\n\nSQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`hepcoshop_sw_bike_prod`.`#sql-6ae_1bdee8`, CONSTRAINT `fk.product_review.customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) ON DELETE SET NULL ON UPDATE CASCADE)"}

Habe dann in Migration1598520424UpdateProductReviewConstraint die ALTER Routinen auskommentiert und das Update über die Console fortgeführt. Web zeigte mir nur den Wartungsmodus. Die ALTER Statements habe ich dann händisch auf der DB abgesetzt. 

Da Wartungsmodus immer noch aktiv, haben ich http(s)://www.mein-shop.de/recovery/update/index.php aufrufen. Hier wurde mir ein weiterer Fehler angezeigt:

{"code":0,"message":"The file files\/backup\/auto_update\/dummy already exists and can not be overwritten.","file":"\/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/knplabs\/gaufrette\/src\/Gaufrette\/Filesystem.php","line":100,"trace":"#0 \/home\/sw\/production\/vendor\/shopware\/recovery\/Update\/src\/Steps\/UnpackStep.php(66): Gaufrette\\Filesystem->write('files\/backup\/au...', 'dummyfile')\n#1 \/home\/sw\/production\/vendor\/shopware\/recovery\/Update\/src\/Controller\/BatchController.php(90): Shopware\\Recovery\\Update\\Steps\\UnpackStep->run(0, 0)\n#2 \/home\/sw\/production\/vendor\/shopware\/recovery\/Update\/src\/app.php(91): Shopware\\Recovery\\Update\\Controller\\BatchController->unpack(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))\n#3 [internal function]: Closure->{closure}(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)\n#4 \/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/slim\/slim\/Slim\/Handlers\/Strategies\/RequestResponse.php(40): call_user_func(Object(Closure), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)\n#5 \/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/slim\/slim\/Slim\/Route.php(281): Slim\\Handlers\\Strategies\\RequestResponse->__invoke(Object(Closure), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)\n#6 \/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/slim\/slim\/Slim\/MiddlewareAwareTrait.php(117): Slim\\Route->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))\n#7 \/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/slim\/slim\/Slim\/Route.php(268): Slim\\Route->callMiddlewareStack(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))\n#8 \/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/slim\/slim\/Slim\/App.php(503): Slim\\Route->run(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))\n#9 \/home\/sw\/production\/vendor\/shopware\/recovery\/Update\/src\/app.php(66): Slim\\App->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))\n#10 [internal function]: Closure->{closure}(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\App))\n#11 \/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/slim\/slim\/Slim\/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)\n#12 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\App))\n#13 \/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/slim\/slim\/Slim\/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\\DeferredCallable), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\App))\n#14 \/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/slim\/slim\/Slim\/MiddlewareAwareTrait.php(117): Slim\\App->Slim\\{closure}(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))\n#15 \/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/slim\/slim\/Slim\/App.php(392): Slim\\App->callMiddlewareStack(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))\n#16 \/home\/sw\/production\/vendor\/shopware\/recovery\/Common\/vendor\/slim\/slim\/Slim\/App.php(297): Slim\\App->process(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))\n#17 \/home\/sw\/production\/vendor\/shopware\/recovery\/Update\/index.php(36): Slim\\App->run()\n#18 \/home\/sw\/production\/public\/recovery\/update\/index.php(6): require_once('\/home\/hepcoshop...')\n#19 {main}"}

 

Nachdem ich SW_ROOT/files/backup/auto_update/dummy gelöscht habe, und die Recovery URL erneut aufgerufen haben, lief das Update dann final durch. Vielleicht steht ja mal jemand vor dem gleichen Problem.

Ideen warum es bei dem ALTER Statements (ALTER TABLE product_review ADD CONSTRAINT fk.product_review.customer_id FOREIGN KEY (customer_id) REFERENCES customer (id) ON DELETE SET NULL ON UPDATE CASCADE) zum Fehler kam? 

Die Daten im Shop wurden von Magento 1.9 mit den SW Migration Tools migriert. Vielleicht spielt das eine Rolle? Wo bei sich eine andere SW 6 Instanz mit Migrationsdaten problemlos updaten ließ…

 

Gruß Mike

1 „Gefällt mir“