Update 4.9.28 › 4.9.30: Install Tool kann die Datenbank nicht vollständig updaten
Habe ein Update über den Contao-Manager gemacht, lief auch sauber durch. Aktualisierung der Datenbank übers Installtool hängt bei:
Code:
Spalten anlegen:
ALTER TABLE tl_search_index ADD PRIMARY KEY (id)
ALTER TABLE tl_search_index ADD id INT UNSIGNED AUTO_INCREMENT NOT NULL
mit der Contao-Fehlermeldung »Es ist ein Fehler aufgetreten ... </ ...Wo ist das Problem? ... «
Das Log sagt sowas:
Zitat:
[2022-06-30 16:27:07] request.INFO: Matched route "contao_install". {"route":"contao_install","route_parameters":{"_ro ute":"contao_install","_scope":"backend","_token_c heck":true,"_controller":"Contao\\InstallationBund le\\Controller\\InstallationController::installAct ion"},"request_uri":"https://[...]/contao/install","method":"POST"} []
[2022-06-30 16:27:07] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing 'ALTER TABLE tl_search_index ADD PRIMARY KEY (id)': SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'id' doesn't exist in table" at [...]/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 128 {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occurred while executing 'ALTER TABLE tl_search_index ADD PRIMARY KEY (id)':\n\nSQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'id' doesn't exist in table at [...]/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128, Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'id' doesn't exist in table at [...]/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'id' doesn't exist in table at [...]/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:141)"} []
Die anderen Posts zu ähnlichen Themen hier scheinen andere Fehler zu beheben. Jemand eine Idee, woran das liegt / wie ich das Problem beheben kann?
Vielen Dank im Voraus!
Andere Baustelle, ähnliches Problem (4.9.27 › 4.9.31)
Jetzt bin ich bei einer anderen Installation, habe ein ganz ähnliches Problem mit dem Update: diesmal ist das die Meldung:
Code:
[2022-07-06 15:54:38] request.INFO: Matched route "contao_install". {"route":"contao_install","route_parameters":{"_route":"contao_install","_scope":"backend","_token_check":true,"_controller":"Contao\\InstallationBundle\\Controller\\InstallationController::installAction"},"request_uri":"https://rws-salem.de/contao/install","method":"POST"} []
[2022-07-06 15:54:38] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing 'ALTER TABLE tl_content CHANGE playerColor playerColor VARCHAR(6) CHARACTER SET ascii DEFAULT '' NOT NULL COLLATE `ascii_bin`': SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'playerColor' at row 1" at /[...contao-inst-pfad...]/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 128 {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 0): An exception occurred while executing 'ALTER TABLE tl_content CHANGE playerColor playerColor VARCHAR(6) CHARACTER SET ascii DEFAULT '' NOT NULL COLLATE `ascii_bin`':\n\nSQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'playerColor' at row 1 at /[...contao-inst-pfad...]/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128, Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 22001): SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'playerColor' at row 1 at /[...contao-inst-pfad...]/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18, PDOException(code: 22001): SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'playerColor' at row 1 at /[...contao-inst-pfad...]/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:141)"} []
… und es ist diese Tabellen betroffen:
Code:
ALTER TABLE tl_content CHANGE playerColor playerColor VARCHAR(6) CHARACTER SET ascii DEFAULT '' NOT NULL COLLATE `ascii_bin`
Das System war vorher 4.9.27 und das Update ist inzwischen 4.9.31. Update ist sauber durchgelaufen.