[Solved] Upgrade 3.1.x > 3.2.6 Schema update fails

Moderator: crythias

Locked
inwiwo
Znuny newbie
Posts: 20
Joined: 16 Jun 2012, 17:13
Znuny Version: 5.0.6

[Solved] Upgrade 3.1.x > 3.2.6 Schema update fails

Post by inwiwo »

Hi all,

I'm trying to upgrade from 3.1.x to 3.2.6 and I'm stuck at step 9.

bin/otrs.CheckDB.pl gives me the following errors

Code: Select all

Trying to connect to database
DSN: DBI:mysql:database=otrs;host=localhost;
DatabaseUser: otrs

Connected.
Your storage engine is InnoDB.
These tables use a different storage engine:

article
article_attachment
article_flag
article_plain
article_search
article_sender_type
article_type
auto_response
auto_response_type
customer_company
customer_preferences
customer_user
dynamic_field
dynamic_field_value
faq_attachment
faq_category
faq_category_group
faq_history
faq_item
faq_language
faq_log
faq_state
faq_state_type
faq_voting
follow_up_possible
generic_agent_jobs
gi_debugger_entry
gi_debugger_entry_content
gi_object_lock_state
gi_webservice_config
gi_webservice_config_history
group_customer_user
group_role
group_user
groups
link_object
link_relation
link_state
link_type
mail_account
notification_event
notification_event_item
notifications
package_repository
personal_queues
postmaster_filter
process_id
queue
queue_auto_response
queue_preferences
queue_standard_response
role_user
roles
salutation
scheduler_task_list
search_profile
service
service_customer_user
service_preferences
service_sla
signature
sla
sla_preferences
smime_signer_cert_relations
standard_attachment
standard_response
standard_response_attachment
support_bench_test
system_address
ticket
ticket_flag
ticket_history
ticket_history_type
ticket_index
ticket_lock_index
ticket_lock_type
ticket_loop_protection
ticket_priority
ticket_state
ticket_state_type
ticket_type
ticket_watcher
time_accounting
user_preferences
users
valid
virtual_fs
virtual_fs_db
virtual_fs_preferences
web_upload_cache
xml_storage

 *** Please correct these problems! *** 
So I thought, running cat "scripts/DBUpdate-to-3.2.mysql.sql | mysql -p -f -u root otrs" will solve the problems by changing the existing tables to use InnoDB as storage engine, but now I'm getting these errors

Code: Select all

ERROR 1091 (42000) at line 7: Can't DROP 'group_read'; check that column/key exists
ERROR 1091 (42000) at line 11: Can't DROP 'group_write'; check that column/key exists
ERROR 1091 (42000) at line 15: Can't DROP 'other_read'; check that column/key exists
ERROR 1091 (42000) at line 19: Can't DROP 'other_write'; check that column/key exists
ERROR 1091 (42000) at line 20: Can't DROP 'ticket_answered'; check that column/key exists
ERROR 1091 (42000) at line 24: Can't DROP 'ticket_answered'; check that column/key exists
ERROR 1091 (42000) at line 29: Can't DROP 'group_id'; check that column/key exists
ERROR 1050 (42S01) at line 34: Table 'pm_process' already exists
ERROR 1050 (42S01) at line 51: Table 'pm_activity' already exists
ERROR 1050 (42S01) at line 66: Table 'pm_activity_dialog' already exists
ERROR 1050 (42S01) at line 81: Table 'pm_transition' already exists
ERROR 1050 (42S01) at line 96: Table 'pm_transition_action' already exists
ERROR 1050 (42S01) at line 111: Table 'pm_entity' already exists
ERROR 1050 (42S01) at line 118: Table 'pm_entity_sync' already exists
ERROR 1060 (42S21) at line 129: Duplicate column name 'internal_field'
ERROR 1062 (23000) at line 135: Duplicate entry 'ProcessManagementProcessID' for key 'dynamic_field_U_803'
ERROR 1062 (23000) at line 141: Duplicate entry 'ProcessManagementActivityID' for key 'dynamic_field_U_803'
ERROR 1005 (HY000) at line 158: Can't create table 'otrs.#sql-6d2_84e' (errno: 150)
ERROR 1005 (HY000) at line 159: Can't create table 'otrs.#sql-6d2_84e' (errno: 150)
ERROR 1005 (HY000) at line 160: Can't create table 'otrs.#sql-6d2_84e' (errno: 150)
ERROR 1005 (HY000) at line 161: Can't create table 'otrs.#sql-6d2_84e' (errno: 150)
ERROR 1005 (HY000) at line 162: Can't create table 'otrs.#sql-6d2_84e' (errno: 150)
ERROR 1005 (HY000) at line 163: Can't create table 'otrs.#sql-6d2_84e' (errno: 150)
ERROR 1005 (HY000) at line 164: Can't create table 'otrs.#sql-6d2_84e' (errno: 150)
ERROR 1005 (HY000) at line 165: Can't create table 'otrs.#sql-6d2_84e' (errno: 150)
ERROR 1005 (HY000) at line 166: Can't create table 'otrs.#sql-6d2_84e' (errno: 150)
ERROR 1005 (HY000) at line 167: Can't create table 'otrs.#sql-6d2_84e' (errno: 150)
and I can't proceed. How do I solve that problem?
Last edited by inwiwo on 25 Apr 2013, 23:12, edited 1 time in total.
inwiwo
Znuny newbie
Posts: 20
Joined: 16 Jun 2012, 17:13
Znuny Version: 5.0.6

[Solved] Re: Upgrade 3.1.x > 3.2.6 Schema update fails

Post by inwiwo »

Ok, found the solution here. Would have been nice to include this information about the script "bin/otrs.MySQLInnoDBSwitch.pl" in the upgrading instructions.

I assume these "errors" are just notifications

Code: Select all

ERROR 1050 (42S01) at line 34: Table 'pm_process' already exists
ERROR 1050 (42S01) at line 51: Table 'pm_activity' already exists
ERROR 1050 (42S01) at line 66: Table 'pm_activity_dialog' already exists
ERROR 1050 (42S01) at line 81: Table 'pm_transition' already exists
ERROR 1050 (42S01) at line 96: Table 'pm_transition_action' already exists
ERROR 1050 (42S01) at line 111: Table 'pm_entity' already exists
ERROR 1050 (42S01) at line 118: Table 'pm_entity_sync' already exists
The rest of the upgrade went without problems. Sorry for the noise...
Locked