Not possible to complete migration 5.0.20 -> 6.0.16

Moderator: crythias

Post Reply
Eric44
Znuny newbie
Posts: 3
Joined: 04 Oct 2013, 20:12
Znuny Version: 3.2.10
Real Name: Eric
Company: cdg44.fr

Not possible to complete migration 5.0.20 -> 6.0.16

Post by Eric44 »

Hi,

I try to migrate my OTRS server (debian) to 5.0.20 to 6.0.16

when y launch the migration script y have this error:

could you help me ??

Code: Select all

root@otrs:/opt/otrs# su -c "scripts/DBUpdate-to-6.pl --verbose --cleanup-orphaned-articles" -s /bin/bash otrs

 Migration started ...

 Checking requirements ...

    Requirement check for: Check framework version ...
    Requirement check for: Check required Perl version ...
    Installed Perl version: v5.20.2. Minimum required Perl version: v5.16.0.
    Requirement check for: Check required database version ...
    Installed database version: MySQL 5.5.62. Minimum required database version: 5.0.0.
    Requirement check for: Check database charset ...
    The setting character_set_client is: utf8. The setting character_set_database is: utf8. No tables found with invalid charset.
    Requirement check for: Check required Perl modules ...

    Executing /opt/otrs/bin/otrs.CheckModules.pl to check for missing required modules.

  o Apache::DBI......................ok (v1.12)
  o Apache2::Reload..................ok (v0.13)
  o Archive::Tar.....................ok (v1.96)
  o Archive::Zip.....................ok (v1.39)
  o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
  o Crypt::SSLeay....................ok (v0.58)
  o Date::Format.....................ok (v2.24)
  o DateTime.........................ok (v1.12)
  o DBI..............................ok (v1.631)
  o DBD::mysql.......................ok (v4.028)
  o DBD::ODBC........................ok (v1.50)
  o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
  o DBD::Pg..........................ok (v3.4.2)
  o Digest::SHA......................ok (v5.88)
  o Encode::HanExtra.................ok (v0.23)
  o IO::Socket::SSL..................ok (v2.002)
  o JSON::XS.........................ok (v2.34)
  o List::Util::XS...................ok (v1.38)
  o LWP::UserAgent...................ok (v6.26)
  o Mail::IMAPClient.................ok (v3.35)
    o IO::Socket::SSL................ok (v2.002)
    o Authen::SASL...................ok (v2.16)
    o Authen::NTLM...................Not installed! Use: 'apt-get install -y libauthen-ntlm-perl' (optional - Required for NTLM authentication mechanism in IMAP connections.)
  o ModPerl::Util....................ok (v2.000009)
  o Net::DNS.........................ok (v0.81)
  o Net::LDAP........................ok (v0.64)
  o Template.........................ok (v2.24)
  o Template::Stash::XS..............ok (undef)
  o Text::CSV_XS.....................ok (v1.11)
  o Time::HiRes......................ok (v1.9726)
  o XML::LibXML......................ok (v2.0116)
  o XML::LibXSLT.....................ok (v1.92)
  o XML::Parser......................ok (v2.41)
  o YAML::XS.........................ok (v0.41)
    Requirement check for: Check if database has been backed up ...

        Warning: this script can make changes to your database which are irreversible.
        Make sure you have properly backed up complete database before continuing.

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

    Requirement check for: Upgrade database structure ...

Trying to connect to database 'DBI:mysql:database=otrs;host=127.0.0.1' with user 'otrs'...
Connection successful.

    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 ...
    Requirement check for: Migrate ArticleType in ProcessManagement Data ...
    Requirement check for: Migrate ArticleType in PostMaster filters ...

 Executing tasks ...

    Step 1 of 42: Check framework version ...
    Step 2 of 42: Check required Perl version ...
    Step 3 of 42: Check required database version ...
    Step 4 of 42: Check database charset ...
    Step 5 of 42: Check required Perl modules ...
    Step 6 of 42: Check if database has been backed up ...
    Step 7 of 42: Upgrade database structure ...

       - Add table for dynamic field object names and add an index to speed up searching dynamic field text values
       - Add new sysconfig tables
       - Remove no longer needed MD5 columns from some tables
       - Add new communication channel table and insert data
       - Change article table structure and prepare renaming of article tables
       - Rename article tables
       - Create new article table and change some table structures after renaming of article tables
       - Add an index to the ticket_history table and add EmailResend ticket history type
       - Add new tables for customer relations
       - Add new table for chat data
       - Change the password columns in the user/customer user tables
       - Add new table for article search index
       - Add new tables for communication logs
       - Update notification tables
       - Drop obsolete create_time_unix column from ticket table
       - Replace column create_time_unix column by create_time column in ticket_index table
       - Index article_data_mime table
       - Fix user preference keys
         - Blacklisted keys not found in user preference tables.


    Step 8 of 42: Migrate configuration ...

    If you see errors about 'Setting ... is invalid', that's fine, no need to worry!
    This could happen because some config settings are no longer needed for OTRS 6
    or you may have some packages installed, which will be migrated
    in a later step (during the package upgrade).

    The configuration migration can take some time, please be patient.

        - AllSettingsCount: 18
        - DisabledCount: 0
        - MissingCount: 2
        - UnsuccessfullCount: 0


Missing Settings:
PreferencesGroups###SpellDict
NodeID
    Step 9 of 42: Refresh configuration cache after migration of OTRS 5 settings ...
    Step 10 of 42: Migrating ticket storage configuration ...
    Step 11 of 42: Migrating article search index configuration ...
    Step 12 of 42: Migrating ticket zoom customer information widget configuration ...
    Step 13 of 42: Drop deprecated table gi_object_lock_state ...
    Step 14 of 42: Migrate PossibleNextActions setting ...
    Step 15 of 42: Migrate ZoomExpand setting ...

    There is no modified ZoomExpand config value, skipping migration...
    Step 16 of 42: Migrating time zone configuration ...
    Step 17 of 42: Create appointment calendar tables ...
    Step 18 of 42: Create ticket number counter tables ...

        - Table 'ticket_number_counter' already exists, skipping...

    Step 19 of 42: Update calendar appointment future tasks ...
    Step 20 of 42: Add basic appointment notification for reminders ...
    Step 21 of 42: Create Form Draft tables ...
    Step 22 of 42: Clean and drop group_user permission_value column ...
    Step 23 of 42: Migrate GenericAgent jobs configuration ...
    Step 24 of 42: Migrate TicketAppointment rules configuration ...
    Step 25 of 42: Migrate Merged Ticket history name values ...
    Step 26 of 42: Migrate ticket statistics ...
    Step 27 of 42: Migrate ticket notifications ...
    Step 28 of 42: Create entries in new article table ...
    Step 29 of 42: Post changes on article related tables ...

        - Reseting auto-incremental if needed for article table.
        - Performing needed actions on article_data_mime table.
        - Performing needed actions on article_data_mime_plain table.
        - Performing needed actions on article_data_mime_attachment table.
        - Re-create foreign keys pointing to the old article table.
        - Dropping no longer needed article_type table.

[Thu Jan 24 12:45:34 2019] DBUpdate-to-6.pl: DBD::mysql::db do failed: Cannot delete or update a parent row: a foreign key constraint fails at /opt/otrs/Kernel/System/DB.pm line 470.
ERROR: OTRS-otrs.Console.pl-Maint::Database::Check-15 Perl: 5.20.2 OS: linux Time: Thu Jan 24 12:45:34 2019

 Message: Cannot delete or update a parent row: a foreign key constraint fails, SQL: 'DROP TABLE IF EXISTS article_type'

 Traceback (3695):
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 394
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 342
   Module: scripts::DBUpdateTo6::PostArticleTableStructureChanges::_DropArticleTypeTable Line: 433
   Module: scripts::DBUpdateTo6::PostArticleTableStructureChanges::Run Line: 72
   Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
   Module: scripts::DBUpdateTo6::Run Line: 69
   Module: scripts/DBUpdate-to-6.pl Line: 87


ERROR: OTRS-otrs.Console.pl-Maint::Database::Check-15 Perl: 5.20.2 OS: linux Time: Thu Jan 24 12:45:34 2019

 Message: Error during execution of 'DROP TABLE IF EXISTS article_type'!

 Traceback (3695):
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 397
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 342
   Module: scripts::DBUpdateTo6::PostArticleTableStructureChanges::_DropArticleTypeTable Line: 433
   Module: scripts::DBUpdateTo6::PostArticleTableStructureChanges::Run Line: 72
   Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
   Module: scripts::DBUpdateTo6::Run Line: 69
   Module: scripts/DBUpdate-to-6.pl Line: 87

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

My OTRS server 5 works well since many years ... i really don't kno why this migration is so complicated !
thx for your help !!
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Not possible to complete migration 5.0.20 -> 6.0.16

Post by jojo »

as the migration script says: "Cannot delete or update a parent row: a foreign key constraint fails"

WHich means that your database is not consistent. (Because of manual inserts or deletions)
"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
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Not possible to complete migration 5.0.20 -> 6.0.16

Post by reneeb »

Any addons installed?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Post Reply