0013432: Update from 2017.07.5 to 2017.08.3 not possible #6644

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

Comments

Projects
None yet
1 participant
@Gloirin

Gloirin commented Jun 9, 2018

Reported by chrbayer on 13 Sep 2017 08:21

Version: 2017.08.3 Community Edition

Tinebase and 7 other applications needed to be updated. After some time, the update brakes with an error, Tinebase has been updated from 10.28 to 10.31.
Trying to update again always breaks with this error message:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (tine20.#sql-2f9_1578, CONSTRAINT tine20_container_content::container_id--container::id FOREIGN KEY (container_id) REFERENCES tine20_container (id) ON DELETE CASCADE), query was: ALTER TABLE tine20_container_content ADD CONSTRAINT tine20_container_content::container_id--container::id FOREIGN KEY (container_id) REFERENCES tine20_container (id) ON DELETE CASCADE
.../vendor/zendframework/zendframework1/library/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute()
.../vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute()
.../vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query()
.../Setup/Backend/Abstract.php(207): Zend_Db_Adapter_Pdo_Abstract->query()
.../Setup/Backend/Abstract.php(408): Setup_Backend_Abstract->execQueryVoid()
.../Tinebase/Setup/Update/Release10.php(1464): Setup_Backend_Abstract->addForeignKey()
.../Setup/Controller.php(568): Tinebase_Setup_Update_Release10->update_31()
.../Setup/Controller.php(455): Setup_Controller->updateApplication()
.../Setup/Frontend/Json.php(120): Setup_Controller->updateApplications()
.../vendor/zendframework/zendframework1/library/Zend/Server/Abstract.php(232): Setup_Frontend_Json->updateApplications()
.../vendor/zendframework/zendframework1/library/Zend/Json/Server.php(590): Zend_Server_Abstract->_dispatch()
.../vendor/zendframework/zendframework1/library/Zend/Json/Server.php(197): Zend_Json_Server->_handle()
.../Setup/Server/Json.php(90): Zend_Json_Server->handle()
.../Setup/Core.php(115): Setup_Server_Json->handle()
.../setup.php(14): Setup_Core::dispatchRequest()

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 14 Sep 2017 11:28

hi,

it looks like you have inconsistent data in container_content. you need to remove the records that have no matching container_id. afterwards the update should run correctly.

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 14 Sep 2017 11:28

hi,

it looks like you have inconsistent data in container_content. you need to remove the records that have no matching container_id. afterwards the update should run correctly.

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by chrbayer on 14 Sep 2017 20:31

Very strange, container_content was indeed inconsistent... After cleaning entries with no longer existing ids from container_content and container_acl, I was able to update. Strange how the database got to this state...

Gloirin commented Jun 11, 2018

Comment posted by chrbayer on 14 Sep 2017 20:31

Very strange, container_content was indeed inconsistent... After cleaning entries with no longer existing ids from container_content and container_acl, I was able to update. Strange how the database got to this state...

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