Upgrade 5.0.26 -> 6.0.5 fails CONSTRAINT

Moderator: crythias

Post Reply
ChrisRitson
Znuny newbie
Posts: 4
Joined: 25 Jan 2018, 13:11
Znuny Version: 5.0.26
Real Name: Chris Ritson
Company: School of Computing, Newcastle University

Upgrade 5.0.26 -> 6.0.5 fails CONSTRAINT

Post by ChrisRitson »

I'm not sure what is wrong, but in the final step of an upgrade from otrs-3.0.9 ->3.0.22 -> 3.1.21 -> 3.2.18 -> 3.3.20 -> 4.0.28 -> 5.0.26 -> otrs-6.0.5/ I get a problem reported by the DBUpdate-to-6.pl script. At step 29, when performing

- Re-create foreign keys pointing to the old article table.

it fails to add a child row and aborts the whole process. Where do I look? A full typescript is attached.

Thanks, Chris.
You do not have the required permissions to view the files attached to this post.
ChrisRitson
Znuny newbie
Posts: 4
Joined: 25 Jan 2018, 13:11
Znuny Version: 5.0.26
Real Name: Chris Ritson
Company: School of Computing, Newcastle University

Re: Upgrade 5.0.26 -> 6.0.5 fails CONSTRAINT

Post by ChrisRitson »

Answering my own post, now that the system is quiet and I am used to backing up and restoring the database!

It turns out that there were over 1700 rows in ticket_history with a 0 ticket_id. That sounds a lot of data to delete, but it was only 2.5% of the table and all of these entries were over 10 years old. They probably came from a badly handled upgrade from otrs 2 to otrs 3 which happened about then. Simply deleting these with a direct SQL query allowed me to continue.

Chris.
Post Reply