Discussion:
Problems after Bugzilla-Upgrade with Testopia
Buch, Christian
2018-07-20 13:48:16 UTC
Permalink
Hello,

our current Bugzilla version is 4.4.2 with Testopia 2.5.

We setup a new host (SLES 12) with following software components:

Bugzilla Version:
[cid:***@01D42040.38F9D580]
MYSQL:
[cid:***@01D42040.38F9D580]

No Testopia is installed there, Testopia is obsolete.

The checksetup.pl with initial database bugs runs perfect.

After customizing and restore the database from the old host the checksetup-script runs into following error:

DBD::mysql::db do failed: Cannot add foreign key constraint [for Statement "ALTER TABLE test_case_components ADD
CONSTRAINT fk_test_case_components_component_id_components_id FOREIGN KEY (component_id)
REFERENCES components(id)
ON UPDATE CASCADE ON DELETE CASCADE"] at Bugzilla/DB.pm line 667.
Bugzilla::DB::bz_add_fks('Bugzilla::DB::Mysql=HASH(0x82b0ed8)', 'test_case_components', 'HASH(0x77bc428)', 'HASH(0x85d33b8)') called at Bugzilla/DB.pm line 571
Bugzilla::DB::bz_setup_foreign_keys('Bugzilla::DB::Mysql=HASH(0x82b0ed8)') called at Bugzilla/Install/DB.pm line 748
Bugzilla::Install::DB::update_table_definitions('HASH(0x20b9a00)') called at ./checksetup.pl line 172

These Tables where parts of Testopia, which isn't installed on the new host.

Deleting these tables and run the script again wasn't successful.

We "downgraded" down to version 4.4.13, that was okay with Testopia-Tables.

Any idea what we can do?

Thanks for help.


Mit engagierten Grüßen / best regards,

Christian Buch
[cid:***@01D42041.11C51A00]<https://www.gibmbh.de/>

Christian Buch

GIB mbH


Birlenbacher Straße 18


57078 Siegen

IT Services

Germany


Phone: +49 271 89038 0


Fax: +49 271 89038 99

[cid:***@01D42041.11C51A00]Skype for Business<sip:***@gibmbh.de>

Mail: ***@gibmbh.de



G.I.B Gesellschaft für Information und Bildung mbH
Birlenbacher Strasse 18, 57078 Siegen
Sitz der Gesellschaft: Siegen; Amtsgericht Siegen HR B 3920
Geschäftsführer: Björn Dunkel

SAP Partner

Der Inhalt dieser Nachricht ist vertraulich und nur für den angegebenen Empfänger bestimmt. Jede Form der Kenntnisnahme oder Weitergabe durch Dritte ist unzulässig. Sollte diese Nachricht nicht für Sie bestimmt sein, so bitten wir Sie, sich mit uns per E-Mail oder telefonisch in Verbindung zu setzen und alle Kopien zu vernichten. Vielen Dank
This message is confidential and may be privileged, and maybe not used or disseminated by anyone other than the intended recipient. If received in error, please notify the sender immediately, and destroy all copies. Thank you.
Thorsten Schöning
2018-07-20 14:27:07 UTC
Permalink
Guten Tag Buch, Christian,
This list removes most attachments, use some file hoster or better
provide inline text.
Post by Buch, Christian
These Tables where parts of Testopia, which isn't installed on the new host.
Deleting these tables and run the script again wasn't successful.
I'm somewhat sure that Bugzilla doesn't work that way: Testopia is an
extension and registers schema changes to Bugzilla's database which
are applied during checksetup.pl. While extensions can register those
changes easily, there's currently no way to unregister them. The only
thing possible is disabling extensions while still keeping them around
and need to care for their compatibility with newer versions of
Bugzilla.

So, you can not upgrade Bugzilla and not use Testopia anymore, you
need to use its current version instead:

https://developer.mozilla.org/en-US/docs/Mozilla/Bugzilla/Testopia#Testopia_3.0_(not_yet_released)
Post by Buch, Christian
Any idea what we can do?
Removing Testopia altogether can only be made manually, by completely
reverting what it has done to your database. That's not only about
deleting tables, but columns etc. as well, simply everything changed.
Bugzilla stores it's current schema including changes by extensions in
the table bz_schema, you can use that to compare it using some diff
tool against an uncustomized version of Bugzilla 5 to get an idea
about what needs to be removed. It's only some Perl hash, no binaray
data like the colum type suggests.

I'm not sure though if this really contains all changes, there are
different hooks available and some read like their changes are not
persistedt in that hash.

https://www.bugzilla.org/docs/4.4/en/html/api/Bugzilla/Hook.html#install_update_db
https://www.bugzilla.org/docs/4.4/en/html/api/Bugzilla/Hook.html#install_update_db_fielddefs
https://www.bugzilla.org/docs/4.4/en/html/api/Bugzilla/Hook.html#db_schema_abstract_schema

Besides that, the only other option coming into my mind is a clean
export/import of all bugs from the old version to the new one using
XML. Most, if not all data is exported that way.

https://www.bugzilla.org/docs/4.4/en/html/api/importxml.html

Mit freundlichen Grüßen,

Thorsten Schöning
--
Thorsten Schöning E-Mail: ***@AM-SoFT.de
AM-SoFT IT-Systeme http://www.AM-SoFT.de/

Telefon...........05151- 9468- 55
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
Loading...