View Issue Details

IDProjectCategoryView StatusLast Update
0013432Tine 2.0Otherpublic2017-09-22 08:57
ReporterchrbayerAssigned Topschuele 
PrioritynormalSeverityblockReproducibilityN/A
Status closedResolutionno change required 
PlatformHP N40LOSLinuxOS Version4.10
Product Version2017.08.3 Community Edition 
Target VersionFixed in Version 
Summary0013432: Update from 2017.07.5 to 2017.08.3 not possible
DescriptionTinebase 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()
TagsNo tags attached.
mwticket

Activities

pschuele

pschuele

2017-09-14 13:28

administrator   ~0020686

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.
chrbayer

chrbayer

2017-09-14 22:31

reporter   ~0020694

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...

Issue History

Date Modified Username Field Change
2017-09-13 10:21 chrbayer New Issue
2017-09-14 13:28 pschuele Assigned To => pschuele
2017-09-14 13:28 pschuele Status new => feedback
2017-09-14 13:28 pschuele Note Added: 0020686
2017-09-14 22:31 chrbayer Note Added: 0020694
2017-09-14 22:31 chrbayer Status feedback => assigned
2017-09-22 08:57 pschuele Status assigned => closed
2017-09-22 08:57 pschuele Resolution open => no change required