Testopia does not support PostgreSQL any more

RESOLVED DUPLICATE of bug 451219

Status

Testopia
Environments
RESOLVED DUPLICATE of bug 451219
9 years ago
9 years ago

People

(Reporter: Roland Walter, Assigned: Greg Hendricks)

Tracking

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
Build Identifier: 2.1

I tried to update from bugzilla 2.22.3 and Testopia 1.2.2 to bugzilla 3.0.8 and testopia 2.1.

This does not work, as the update procedure wants to alter a column with the 'serial'-type. It is not possible in PostgreSQL to execute an 'alter column' with a serial type. PostgreSQL does not support that. If you want to do that you have to remove the default value, then alter the type of the column, readd the default value, with the call to nextvalue(<sequence>). It seems the database layer of bugzilla lacks some functionality there.

Running ./checksetup.pl gives the following error message:

Checking Testopia setup ...
Updating column case_run_status_id in table test_case_run_status ...
Old: TINYSERIAL NOT NULL PRIMARY KEY
New: serial unique NOT NULL PRIMARY KEY
An error occurred processing hook install-update_db in
    extension ./extensions/testopia: DBD::Pg::db do failed: FEHLER:  Typ »serial« existiert nicht at Bugzilla/DB.pm line 525
        Bugzilla::DB::bz_alter_column_raw('Bugzilla::DB::Pg=HASH(0x9bb3d98)', 'test_case_run_status', 'case_run_status_id', 'HASH(0xa0d6c6c)', 'HASH(0x9e02fac)', 'undef') called at Bugzilla/DB.pm line 484
        Bugzilla::DB::bz_alter_column('Bugzilla::DB::Pg=HASH(0x9bb3d98)', 'test_case_run_status', 'case_run_status_id', 'HASH(0xa0d6c6c)') called at ./extensions/testopia/code/install-update_db.pl line 105
        Bugzilla::Hook::testopiaUpdateDB() called at ./extensions/testopia/code/install-update_db.pl line 31
        require ./extensions/testopia/code/install-update_db.pl called at Bugzilla/Hook.pm line 46
        Bugzilla::Hook::process('install-update_db') called at Bugzilla/Install/DB.pm line 529
        Bugzilla::Install::DB::update_table_definitions() called at ./checksetup.pl line 195


Reproducible: Always

Steps to Reproduce:
1. Take an existing installation of bugzilla 2.22.3 with testopia 1.2.2 on PostgreSQL 8.1.16+, only the database.
2. Upgrade to bugzilla 3.0.x. (Unpacked into a new, empty directory.)
3. Install Testopia 2.1.
Actual Results:  
checksetup.pl stops with an error message.

Checking Testopia setup ...
Updating column case_run_status_id in table test_case_run_status ...
Old: TINYSERIAL NOT NULL PRIMARY KEY
New: serial unique NOT NULL PRIMARY KEY
An error occurred processing hook install-update_db in
    extension ./extensions/testopia: DBD::Pg::db do failed: FEHLER:  Typ »serial« existiert nicht at Bugzilla/DB.pm line 525
        Bugzilla::DB::bz_alter_column_raw('Bugzilla::DB::Pg=HASH(0x9bb3d98)', 'test_case_run_status', 'case_run_status_id', 'HASH(0xa0d6c6c)', 'HASH(0x9e02fac)', 'undef') called at Bugzilla/DB.pm line 484
        Bugzilla::DB::bz_alter_column('Bugzilla::DB::Pg=HASH(0x9bb3d98)', 'test_case_run_status', 'case_run_status_id', 'HASH(0xa0d6c6c)') called at ./extensions/testopia/code/install-update_db.pl line 105
        Bugzilla::Hook::testopiaUpdateDB() called at ./extensions/testopia/code/install-update_db.pl line 31
        require ./extensions/testopia/code/install-update_db.pl called at Bugzilla/Hook.pm line 46
        Bugzilla::Hook::process('install-update_db') called at Bugzilla/Install/DB.pm line 529
        Bugzilla::Install::DB::update_table_definitions() called at ./checksetup.pl line 195


Expected Results:  
./checksetup.pl runs without any errors.

You cannot alter columns in PostgreSQL with the type serial. This is a feature of PostgreSQL. If you want to do this, it needs to alter the database layer of bugzilla, or bypass it completely.
(Reporter)

Updated

9 years ago
Version: unspecified → 2.1
(Reporter)

Updated

9 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 451219
You need to log in before you can comment on or make changes to this bug.