Troubleshooting DBUpdate-to-6.pl errors - FK issue

Nick Bright <[email protected]> Thu, 19 Sep 2019 13:58:24 -0500
Newsgroups gmane.comp.otrs.user
Organization Valnet Holdings, LLC
Message-ID <[email protected]>
Greetings,

I'm working on upgrading to v6, and in the process I'm getting an error 
on Step 31/44 in DBUpdate-to-6.pl, clearly caused by some error in the 
database. I'm trying to find that error to correct it, but the error 
message isn't giving me enough information to do so.

Does anybody have any suggestions on how to find the offending data? 
Once I find it, then I can figure out what to do to correct it.

Step 31 of 44: Post changes on article related tables ...

         - Reseting auto-incremental if needed for article table.
         - Performing needed actions on article_data_mime table.
         - Performing needed actions on article_data_mime_plain table.
         - Performing needed actions on article_data_mime_attachment table.
         - Re-create foreign keys pointing to the old article table.
[Thu Sep 19 13:31:20 2019] DBUpdate-to-6.pl: DBD::mysql::db do failed: 
Cannot add or update a child row: a foreign key constraint fails 
(`otrs`.`#sql-5e0_29`, CONSTRAINT `FK_ticket_history_article_id_id` 
FOREIGN KEY (`article_id`) REFERENCES `article` (`id`)) at 
/opt/otrs/Kernel/System/DB.pm line 470.
ERROR: OTRS-otrs.Console.pl-Dev::Code::CPANAudit-10 Perl: 5.16.3 OS: 
linux Time: Thu Sep 19 13:31:20 2019

  Message: Cannot add or update a child row: a foreign key constraint 
fails (`otrs`.`#sql-5e0_29`, CONSTRAINT 
`FK_ticket_history_article_id_id` FOREIGN KEY (`article_id`) REFERENCES 
`article` (`id`)), SQL: 'EXECUTE FKStatement'

  Traceback (5899):
    Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 394
    Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 342
    Module: 
scripts::DBUpdateTo6::PostArticleTableStructureChanges::_RecreateForeignKeysPointingToArticleTable 
Line: 419
    Module: scripts::DBUpdateTo6::PostArticleTableStructureChanges::Run 
Line: 67
    Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
    Module: scripts::DBUpdateTo6::Run Line: 69
    Module: scripts/DBUpdate-to-6.pl Line: 87


ERROR: OTRS-otrs.Console.pl-Dev::Code::CPANAudit-10 Perl: 5.16.3 OS: 
linux Time: Thu Sep 19 13:31:20 2019

  Message: Error during execution of 'EXECUTE FKStatement'!

  Traceback (5899):
    Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 397
    Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 342
    Module: 
scripts::DBUpdateTo6::PostArticleTableStructureChanges::_RecreateForeignKeysPointingToArticleTable 
Line: 419
    Module: scripts::DBUpdateTo6::PostArticleTableStructureChanges::Run 
Line: 67
    Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
    Module: scripts::DBUpdateTo6::Run Line: 69
    Module: scripts/DBUpdate-to-6.pl Line: 87

-- 
-----------------------------------------------
-  Nick Bright                                -
-  Vice President of Technology               -
-  Valnet -=- We Connect You -=-              -
-  Tel 888-332-1616 x 315 / Fax 620-331-0789  -
-  Web http://www.valnet.net/                 -
-----------------------------------------------
- Are your files safe?                        -
- Valnet Vault - Secure Cloud Backup          -
- More information & 30 day free trial at     -
- http://www.valnet.net/services/valnet-vault -
-----------------------------------------------

---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/mailman/listinfo/otrs