DB upgrade references tables that don't exist

English! place to talk about development, programming and coding
Post Reply
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

DB upgrade references tables that don't exist

Post by crythias »

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
root
Administrator
Posts: 3931
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: DB upgrade references tables that don't exist

Post by root »

Hi,

There is still a table called article. The original will be renamed and a new one created: https://github.com/OTRS/otrs/blob/rel-6 ... ame.pm#L36

FK should be kept while renaming a table.

What' s your error message?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: DB upgrade references tables that don't exist

Post by crythias »

my article table didn't exist.

Code: Select all

[Wed Dec  9 16:03:06 2020] DBUpdate-to-6.pl: DBD::mysql::db do failed: Can't create table `otrs`.`article_data_mime_send_error` (errno: 150 "Foreign key constraint is incorrectly formed") at /opt/otrs/Kernel/System/DB.pm line 470.
ERROR: OTRS-otrs.Console.pl-Dev::Code::CPANAudit-13 Perl: 5.30.0 OS: linux Time: Wed Dec 9 16:03:06 2020

 Message: Can't create table `otrs`.`article_data_mime_send_error` (errno: 150 "Foreign key constraint is incorrectly formed"), SQL: 'EXECUTE FKStatement'
Trying again..
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
root
Administrator
Posts: 3931
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: DB upgrade references tables that don't exist

Post by root »

Hi,

which tables do you have right now in your OTRS 5 database?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: DB upgrade references tables that don't exist

Post by crythias »

I rebuilt otrs db again...

Code: Select all

 - Add new table for chat data
[Wed Dec  9 23:51:32 2020] DBUpdate-to-6.pl: DBD::mysql::db do failed: Can't cre                                                                                                                                                             ate table `otrs`.`article_data_otrs_chat` (errno: 150 "Foreign key constraint is                                                                                                                                                              incorrectly formed") at /opt/otrs/Kernel/System/DB.pm line 470.
ERROR: OTRS-otrs.Console.pl-Dev::Code::CPANAudit-13 Perl: 5.30.0 OS: linux Time:                                                                                                                                                              Wed Dec 9 23:51:32 2020

 Message: Can't create table `otrs`.`article_data_otrs_chat` (errno: 150 "Foreig                                                                                                                                                             n key constraint is incorrectly formed"), SQL: 'EXECUTE FKStatement'

 Traceback (65524):
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 394
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 342
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::NewChatDataTable::Run                                                                                                                                                              Line: 53
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::Run Line: 142
   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-Dev::Code::CPANAudit-13 Perl: 5.30.0 OS: linux Time:                                                                                                                                                              Wed Dec 9 23:51:32 2020

 Message: Error during execution of 'EXECUTE FKStatement'!

 Traceback (65524):
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 397
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 342
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::NewChatDataTable::Run                                                                                                                                                              Line: 53
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::Run Line: 142
   Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
   Module: scripts::DBUpdateTo6::Run Line: 69
   Module: scripts/DBUpdate-to-6.pl Line: 87

    Error.
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
skullz
Znuny superhero
Posts: 617
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: DB upgrade references tables that don't exist

Post by skullz »

As a reference, https://stackoverflow.com/questions/843 ... rmed-error

i guess either charset or db engine type ?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: DB upgrade references tables that don't exist

Post by crythias »

No. in this case it's article table is gone.
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
Post Reply