Upgrade from OTRS 5 to OTRS 6 failed in DBUpdate-to-6.pl with error "ticket_history" does not exist

Moderator: crythias

Post Reply
LXsysadmin
Znuny newbie
Posts: 21
Joined: 28 Jun 2018, 12:23
Znuny Version: 5.0.22
Real Name: Martins

Upgrade from OTRS 5 to OTRS 6 failed in DBUpdate-to-6.pl with error "ticket_history" does not exist

Post by LXsysadmin »

We have OTRS 5 in Centos 7 with Postgresql 9.2. I am trying to upgrade OTRS to version 6 and get such error:

[root@otrs6 scripts]# su -c "./DBUpdate-to-6.pl" -s /bin/bash otrs

Migration started ...

Checking requirements ...

Requirement check for: Check framework version ...
Requirement check for: Check required Perl version ...
Requirement check for: Check required database version ...
Requirement check for: Check database charset ...
Requirement check for: Check required Perl modules ...
Requirement check for: Check if database has been backed up ...

Did you backup the database? [Y]es/[N]o: y

Requirement check for: Upgrade database structure ...
Error: The following sequences with possible wrong names have been found. Please rename them manually.
pop3_account_id_seq
standard_response_attachment_id_seq
standard_response_id_seq
system_user_id_seq
Requirement check for: Migrating time zone configuration ...
Requirement check for: Update calendar appointment future tasks ...
Requirement check for: Migrate GenericAgent jobs configuration ...
Requirement check for: Migrate TicketAppointment rules configuration ...
Requirement check for: Create entries in new article table ...
Found 37 orphaned entries in ticket_history table ...
Do you want to automatically delete the entries from the database now? [Y]es/[N]o: y
[Thu Jun 28 12:53:36 2018] DBUpdate-to-6.pl: DBD::Pg::db do failed: ERROR: column "ticket_history" of relation "ticket_history" does not exist
[Thu Jun 28 12:53:36 2018] DBUpdate-to-6.pl: LINE 3: SET ticket_history.article_id = NULL
[Thu Jun 28 12:53:36 2018] DBUpdate-to-6.pl: ^ at /opt/otrs/Kernel/System/DB.pm line 470, <> line 13.
ERROR: OTRS-otrs.Console.pl-Maint::Database::Check-10 Perl: 5.16.3 OS: linux Time: Thu Jun 28 12:53:36 2018

Message: ERROR: column "ticket_history" of relation "ticket_history" does not exist
LINE 3: SET ticket_history.article_id = NULL
^, SQL: '
UPDATE ticket_history
SET ticket_history.article_id = NULL
WHERE ticket_history.article_id = 0
'

Traceback (2511):
Module: scripts::DBUpdateTo6::MigrateArticleData::CheckPreviousRequirement Line: 510
Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 163
Module: scripts::DBUpdateTo6::Run Line: 69
Module: ./DBUpdate-to-6.pl Line: 89

Not possible to complete migration, check previous messages for more information.


How to fix this error?
KimmoJ
Znuny newbie
Posts: 47
Joined: 15 Sep 2011, 09:32
Znuny Version: 6.0.22
Real Name: Kimmo Jaskari
Company: Transmar Ab

Re: Upgrade from OTRS 5 to OTRS 6 failed in DBUpdate-to-6.pl with error "ticket_history" does not exist

Post by KimmoJ »

Try checking the integrity of your database tables with the MySQL tools for that, would be my recommendation. The script worked fine for me when upgrading my OTRS 5 database.
Post Reply