Migration from 3.1 to 3.3

Moderator: crythias

Post Reply
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Migration from 3.1 to 3.3

Post by kruegerM »

I've finally been given the go-ahead to migrate from 3.1.6 to 3.3.7. I have migrated to 3.2.16 with only one anomaly - the following error was given during the migration perl script (was run as user 'otrs'):

DROP INDEX article_flag_create_by ON article_flag
DBD::mysql::db do failed: Can't DROP 'article_flag_create_by'; check that column/key exists at /opt/otrs/Kernel/Systems/DB.pm line 476.
ERROR: OTRS-DBUpdate-to-3.2.10 Perl: 5.10.0 OS: linux Time: Wed Jun 25 14:05:06 2014

Message: Can't DROP 'article_flag_create_by'; check that column/key exists, SQL: 'DROP INDEX article_flag_create_by ON article_flag'

Traceback (5875):
Module: main::_DropAriticleFlagIndexes (unknown version) Line: 486
Module: /opt/otrs/scripts/DBUpdate-to-3.2.pl (unknown version) Line: 107

--What needs done to finalize the migration?

Thanks!
Last edited by kruegerM on 30 Jun 2014, 19:27, edited 1 time in total.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Migration from 3.1 to 3.2

Post by crythias »

considering it's a drop, and it's complaining that what it's dropping doesn't exist, I'd reasonably assume this is safe to ignore,



If, however, it *stops* the upgrade because of this, then restore your backup, create the appropriate column, run the upgrade again.

(I'm just some guy on the interwebs, so you don't have to listen to what I say. :) :) )
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Re: Migration from 3.1 to 3.3

Post by kruegerM »

Thanks - I guess I missed what it was doing - got hung up on "check that column/key exists" - although if I **had** checked the table, I would have seen the column **does** exist.
(and I can stop listening to what you say when you give me bad advice :) )

There is another error I missed - this one is trying to add a Foreign Key Constraint - I think it's just stating it can't add the constraint because an index or foreign key doesn't exist and maybe it's not an issue either - but you know I have to check...

ALTER TABLE article_flag ADD CONSTRAINT FK_article_flag_article_id_id FOREIGN KEY (article_id) REFERENCES article (id)
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`otrs`.<result 2 when explaining filename '#sql-149d_61'>, CONSTRAINT `FK_article_flag_article_id_id` FOREIGN KEY (`article_id`) REFERENCES `article` (`id`)) at /opt/otrs/Kernel/System/DB.pm line 476.
ERROR: OTRS-DBUpdate-to-3.2-10 Perl: 5.10.0 OS: linux Time: Wed Jun 25 14:48:13 2014

Message: Cannot add or update a child row: a foreign key constraint fails (`otrs`.<result 2 when explaining filename '#sql-149d_61'>, CONSTRAINT `FK_article_flag_article_id_id` FOREIGN KEY (`article_id`) REFERENCES `article` (`id`)), SQL: 'ALTER TABLE article_flag ADD CONSTRAINT FK_article_flag_article_id_id FOREIGN KEY (article_id) REFERENCES article (id)'

Traceback (5875):
Module: main::_DropArticleFlagIndexes (unknown version) Line: 486
Module: /opt/otrs/scripts/DBUpdate-to-3.2.pl (unknown version) Line: 107

Index was not present
Last edited by kruegerM on 30 Jun 2014, 19:28, edited 1 time in total.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Migration from 3.1 to 3.2

Post by crythias »

Foreign key restraint is (most likely) because of myisam/innodb ...

look at bin/otrs.MySQLInnoDBSwitch.pl
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Re: Migration from 3.1 to 3.3

Post by kruegerM »

I set it at migration to 3.2 - checking it shows:
all tables have ENGINE of InnoDB
global variable 'storage_engine' reports as InnoDB
default-storage-engine in my.cnf is set to InnoDB

m
Last edited by kruegerM on 30 Jun 2014, 19:28, edited 1 time in total.
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Re: Migration from 3.1 to 3.3

Post by kruegerM »

additional info - the DBUpdate SQL script gave the following message:

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.
Last edited by kruegerM on 30 Jun 2014, 19:28, edited 1 time in total.
kruegerM
Znuny expert
Posts: 213
Joined: 02 Dec 2010, 16:53
Znuny Version: 6.0.29
Real Name: Marc
Company: National Jewish Health
Location: Denver, CO

Re: Migration from 3.1 to 3.3

Post by kruegerM »

the subject SHOULD have read Migration from 3.1 to 3.3.... I updated the ones I could
The 3.1 -> 3.2 part went well.
It's the 3.2 -> 3.3 that's giving me the issues.
aqueel
Znuny newbie
Posts: 14
Joined: 19 Nov 2014, 12:22
Znuny Version: otrs 3.0
Real Name: AQUEEL
Company: AMANA

Re: Migration from 3.1 to 3.3

Post by aqueel »

I am also getting similar issues, after migration unable to add CMDB items. Gives
[Error][main::_DropArticleFlagIndexes][Line:486]: Cannot add or update a child row: a foreign key constraint fails (`otrs`.<result 2 when explaining filename '#sql-3161_43'>, CONSTRAINT `FK_article_flag_article_id_id` FOREIGN KEY (`article_id`) REFERENCES `article` (`id`)), SQL: 'ALTER TABLE article_flag ADD CONSTRAINT FK_article_flag_article_id_id FOREIGN KEY (article_id) REFERENCES article (id)'
Post Reply