Mysql Upgrade Error in 3.3 version

English! place to talk about development, programming and coding
Post Reply
williamrobert1983
Znuny newbie
Posts: 94
Joined: 24 Oct 2013, 11:24
Znuny Version: 3.1.1
Real Name: William
Company: Xchanging

Mysql Upgrade Error in 3.3 version

Post by williamrobert1983 »

Hi,

Please check the errors below :

[root@KL-MOE-OTRS-WEB-02 otrs]# cat scripts/DBUpdate-to-3.3.mysql.sql | mysql -p -f -u root otrs
Enter password:
ERROR 1062 (23000) at line 7: Duplicate entry 'TitleUpdate' for key 'ticket_history_type_name'
ERROR 1091 (42000) at line 10: Can't DROP 'index_search_date'; check that column/key exists
ERROR 1061 (42000) at line 11: Duplicate key name 'dynamic_field_value_search_date'
ERROR 1091 (42000) at line 12: Can't DROP 'index_search_int'; check that column/key exists
ERROR 1061 (42000) at line 13: Duplicate key name 'dynamic_field_value_search_int'
ERROR 1091 (42000) at line 14: Can't DROP 'index_field_values'; check that column/key exists
ERROR 1061 (42000) at line 15: Duplicate key name 'dynamic_field_value_field_values'
ERROR 1091 (42000) at line 16: Can't DROP 'article_message_id'; check that column/key exists
ERROR 1060 (42S21) at line 20: Duplicate column name 'a_message_id_md5'
ERROR 1061 (42000) at line 21: Duplicate key name 'article_message_id_md5'
ERROR 1091 (42000) at line 22: Can't DROP 'article_search_message_id'; check that column/key exists
ERROR 1091 (42000) at line 26: Can't DROP 'a_message_id'; check that column/key exists
ERROR 1050 (42S01) at line 30: Table 'system_data' already exists
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_queue_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_queue_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_attachment_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_attachment_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_change_by_id does not exist, skipping.
ERROR 1146 (42S02) at line 109: Table 'otrs.standard_response' doesn't exist
ERROR 1146 (42S02) at line 113: Table 'otrs.standard_response' doesn't exist
ERROR 1146 (42S02) at line 117: Table 'otrs.queue_standard_response' doesn't exist
ERROR 1146 (42S02) at line 121: Table 'otrs.standard_response_attachment' doesn't exist
ERROR 1061 (42000) at line 122: Duplicate key name 'standard_template_name'
ERROR 1054 (42S22) at line 129: Unknown column 'standard_response_id' in 'queue_standard_template'
ERROR 1054 (42S22) at line 136: Unknown column 'standard_response_id' in 'standard_template_attachment'
ERROR 1060 (42S21) at line 147: Duplicate column name 'f_not'

How to solve this issue? I am getting the errors. But the applications is running fine. But, I always getting this error in log file. Please advice how to solve this issue.

thanks lot!

William
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Mysql Upgrade Error in 3.3 version

Post by jojo »

what version you used before?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
williamrobert1983
Znuny newbie
Posts: 94
Joined: 24 Oct 2013, 11:24
Znuny Version: 3.1.1
Real Name: William
Company: Xchanging

Re: Mysql Upgrade Error in 3.3 version

Post by williamrobert1983 »

the last version used otrs-3.2.11.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Mysql Upgrade Error in 3.3 version

Post by jojo »

it seems that you not followed the UPGRADING file (I get no errors on a 3.2 to 3.3 migration)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
williamrobert1983
Znuny newbie
Posts: 94
Joined: 24 Oct 2013, 11:24
Znuny Version: 3.1.1
Real Name: William
Company: Xchanging

Re: Mysql Upgrade Error in 3.3 version

Post by williamrobert1983 »

OK. thanks. i will check again .
screenshot
Znuny newbie
Posts: 4
Joined: 07 Jan 2014, 12:40
Znuny Version: 3.3.6

Re: Mysql Upgrade Error in 3.3 version

Post by screenshot »

I get the same error and did the upgrade from 3.2.1 to 3.2.14 first. This went fine.
(can I jump from 3.2.1 to 3.2.14 directly or do I have to go through all the upgrades in between?
Well, anyway 3.2.14 seems to works ok.)

But I cannot jump the next hurdle to 3.3.0, 3.3.1 or 3.3.4.

After upgrade all drop down won't work,
Can anybody give me a hint?

Best.


--
If you may I attach my latest logs.

I just tried again from "scratch". Untar the 3.0.1, get database from 3.2.14, copy previous config ...
But still:

so /opt/otrs/bin/otrs.CheckDB.pl gives:
"It looks Ok!"

but
cat /opt/otrs/scripts/DBUpdate-to-3.0.mysql.sql | mysql .... gives
"ERROR 1060 (42S21) at line 7: Duplicate column name 'archive_flag'
ERROR 1061 (42000) at line 10: Duplicate key name 'ticket_create_time_unix'
ERROR 1061 (42000) at line 11: Duplicate key name 'ticket_create_time'
ERROR 1061 (42000) at line 12: Duplicate key name 'ticket_archive_flag'
ERROR 1062 (23000) at line 16: Duplicate entry 'ArchiveFlagUpdate' for key 'ticket_history_type_name'
ERROR 1050 (42S01) at line 22: Table 'ticket_flag' already exists
ERROR 1054 (42S22) at line 35: Unknown column 'article_flag' in 'article_flag'
ERROR 1060 (42S21) at line 42: Duplicate column name 'article_value'
ERROR 1061 (42000) at line 43: Duplicate key name 'article_flag_article_id_create_by'
ERROR 1091 (42000) at line 45: Can't DROP 'article_flag_create_by'; check that column/key exists
ERROR 1050 (42S01) at line 49: Table 'virtual_fs' already exists
ERROR 1050 (42S01) at line 62: Table 'virtual_fs_preferences' already exists
ERROR 1050 (42S01) at line 72: Table 'virtual_fs_db' already exists
ERROR 1054 (42S22) at line 83: Unknown column 'salutation' in 'customer_user'
ERROR 1054 (42S22) at line 122: Unknown column 'salutation' in 'users'
ERROR 1060 (42S21) at line 340: Duplicate column name 'comments'
ERROR 1005 (HY000) at line 352: Can't create table 'otrstest.#sql-3e7_3f490' (errno: 121)
ERROR 1005 (HY000) at line 353: Can't create table 'otrstest.#sql-3e7_3f490' (errno: 121)
ERROR 1005 (HY000) at line 354: Can't create table 'otrstest.#sql-3e7_3f490' (errno: 121)
"

su -c "/opt/otrs/scripts/DBUpdate-to-3.0.pl" -s /bin/bash www-data gives:

DBD::mysql::st execute failed: Table 'otrstest.theme' doesn't exist at /opt/otrs-3.0.1/Kernel/System/DB.pm line 553.
ERROR: OTRS-DBUpdate-to-3.0-10 Perl: 5.14.2 OS: linux Time: Thu Feb 20 15:12:21 2014

Message: Table 'otrstest.theme' doesn't exist, SQL: 'SELECT theme, valid_id FROM theme '

Traceback (5819):
Module: Kernel::System::DB::GetTableData (v1.125) Line: 868
Module: main::MigrateThemes (v1.2) Line: 122
Module: /opt/otrs/scripts/DBUpdate-to-3.0.pl (v1.2) Line: 79

DBD::mysql::st fetchrow_array failed: fetch() without execute() at /opt/otrs-3.0.1/Kernel/System/DB.pm line 616.
ERROR: reading themes from database. Migration halted.
Start migration of the system...
dreinhart
Znuny newbie
Posts: 4
Joined: 07 Nov 2013, 16:21
Znuny Version: 3.3.11
Real Name: Dan Reinhart

Re: Mysql Upgrade Error in 3.3 version

Post by dreinhart »

Did anyone find a solution to this? I am currently wrestling with the same issue.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Mysql Upgrade Error in 3.3 version

Post by jojo »

you have to go from

3.1.x to 3.2.latest to 3.3.latest

Not each patchlevel
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Post Reply