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?
2 „Gefällt mir“
Pahu
14. Juli 2021 um 14:35
2
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
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?
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.