0013406: Crash when trying to upgrade database from 2017.02.05 to 2017.08.03 #6632

Closed
Gloirin opened this Issue Jun 9, 2018 · 3 comments

Comments

Projects
None yet
1 participant
@Gloirin

Gloirin commented Jun 9, 2018

Reported by csvarer on 29 Aug 2017 21:08

Version: 2017.08.3 Community Edition

Hi
I have just tried to upgrade between the two versions mentioned above. Unfortunately, the upgrade of the database doesn't succeed but crashes in the middle of the update process with a message like:

neuro:/home/srv/www/vhosts/tine # php setup.php --update
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (tine20db.#sql-230e_4, CONSTRAINT tine20_container_content::container_id--container::id FOREIGN KEY (container_id) REFERENCES tine20_container (id) ON DELETE CASCADE)' in /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(' in /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Pdo.php on line 235

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (tine20db.#sql-230e_4, CONSTRAINT tine20_container_content::container_id--container::id FOREIGN KEY (container_id) REFERENCES tine20_container (id) ON DELETE CASCADE)' in /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(' in /home/srv/www/vhosts/tine/vendor/zendframework/zendframework1/library/Zend/Db/Statement/Pdo.php on line 235

do you have an idea of how to correct for that?

Best regards
Claus

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by csvarer on 11 Sep 2017 07:49

I got the idea that it perhpas helped deleting the files in the cache, session and tmp files before trying the update and it did. I don't know if it was because I did run the "php setup.php --update" as root where the apache server that normally uses these files is runned as the apache user "wwwrun", but it helped and vers 2017.08.3 is running åerfectly well

Gloirin commented Jun 11, 2018

Comment posted by csvarer on 11 Sep 2017 07:49

I got the idea that it perhpas helped deleting the files in the cache, session and tmp files before trying the update and it did. I don't know if it was because I did run the "php setup.php --update" as root where the apache server that normally uses these files is runned as the apache user "wwwrun", but it helped and vers 2017.08.3 is running åerfectly well

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by csvarer on 11 Sep 2017 07:51

As described in note, solution was to delete the files in cache, session and tmp directories before running the database update script

Gloirin commented Jun 11, 2018

Comment posted by csvarer on 11 Sep 2017 07:51

As described in note, solution was to delete the files in cache, session and tmp directories before running the database update script

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 11 Sep 2017 12:13

ok, thanks for the update. we'll think about adding the clearing if cache/session/tmp to the update process, too.

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 11 Sep 2017 12:13

ok, thanks for the update. we'll think about adding the clearing if cache/session/tmp to the update process, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment