Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C3 > C4 ALTER Table - Fehler #2046

Closed
codesache opened this issue Jun 4, 2019 · 5 comments
Closed

C3 > C4 ALTER Table - Fehler #2046

codesache opened this issue Jun 4, 2019 · 5 comments

Comments

@codesache
Copy link

Bei einem Update einer C3>4.4.40 bekomme ich über das Installtool folgende Fehlermeldung, das drei Tabellen nicht angepasst werden können.

Lokale Installation mit Isotope Version 2.5.13, MAMP Pro, C4.4.40

Hier hat auch jemand das gleiche Problem.
https://community.contao.org/de/showthread.php?75089-Fehlermeldung-im-install-tool&p=505150

Spooky meinte das die SQO Definition sollte auf int(10) NULL geändert werden.


ALTER TABLE tl_iso_product_collection CHANGE date_shipped date_shipped INT DEFAULT NULL

ALTER TABLE tl_iso_product_collection CHANGE date_paid date_paid INT DEFAULT NULL

ALTER TABLE tl_iso_product_collection CHANGE locked locked INT DEFAULT NULL


[2019-06-03 17:25:03] request.INFO: Matched route "contao_install". {"route":"contao_install","route_parameters":{"_sc ope":"backend","_token_check":true,"_controller":" Contao\InstallationBundle\Controller\Installati onController::installAction","_route":"contao_inst all"},"request_uri":"http://projekt-xyz/contao/install","method":"POST"} []
[2019-06-03 17:25:04] app.CRITICAL: An exception occurred. {"exception":"[object] (Doctrine\DBAL\Exception\DriverException(code: 0): An exception occurred while executing 'ALTER TABLE tl_iso_product_collection CHANGE date_shipped date_shipped INT DEFAULT NULL':\n\nSQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'date_shipped' at row 2 at /Users/codesache/Documents/htdocs/projekt-xyz-c4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:126, Doctrine\DBAL\Driver\PDOException(code: HY000): SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'date_shipped' at row 2 at /Users/codesache/Documents/htdocs/projekt-xyz-c4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:109, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'date_shipped' at row 2 at /Users/codesache/Documents/htdocs/projekt-xyz-c4/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:107)"} []

@fritzmg
Copy link
Contributor

fritzmg commented Jun 4, 2019

No, I revised my post in the forum ;). It already is int(10) NULL. However the problem is that in strict mode, you cannot set such a field with an empty string. Only NULL or an integer would be valid.

@aschempp
Copy link
Member

aschempp commented Jun 4, 2019

Scheint als wurden die runonce.php-Jobs bei dir nicht ausgeführt? Hast du Isotope vor oder nach dem Contao Update aktualisiert?

@codesache
Copy link
Author

Ich habe C4 + aller Erweiterungen als Grundinstallation lokal installiert und dann die DB der Live-Seite (C3.5.x) drüber.
Danach habe ich erst das Installtool aufgerufen.

Wie fixe ich das?
Update composer für alle Erweiterungen !?

@aschempp
Copy link
Member

aschempp commented Jun 5, 2019

hmm, dann wird die runonce.php natürlich nicht mehr ausgeführt 😞

Composer wird die Erweiterung nicht neu installieren, wenn sie sich nicht ändert. Am einfachsten duplizierst du die upgrade.php und nennst sie runonce.php. Nach dem nächsten Aufruf des Install-Tools sollte die Datei wieder gelöscht sein.

@codesache
Copy link
Author

Das hat funktioniert!
Habe danach noch mal alle Erweiterungen über Composer Update aktualisiert und dann das Installtool aufgerufen. Es stand nur noch ein Eintrag von einer anderen Erweiterung drinnen die problemlos durch ging.

Vielen lieben Dank Andreas!

@Toflar Toflar closed this as completed Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants