Upgrade-database from 4.0.8 to 4.4.0rc2 fails

Hi,

I’m trying to upgrade an RT 4.0.8 instance (only lightly modified in
RT_SiteConfig.pm, no fancy stuff) to 4.4.0RC2. The ‘make
upgrade-database’ target fails at the following points:

== 4.0.8 => 4.0.9 ==
Processing 4.0.9
Now inserting data.
[11815] [Wed Nov 25 10:44:34 2015] [warning]: DBD::mysql::st execute
failed: Unknown column ‘main.SortOrder’ in ‘order clause’ at
/usr/local/share/perl/5.20.2/DBIx/SearchBuilder/Handle.pm line 586, <>
line 1. (/usr/local/share/perl/5.20.2/DBIx/SearchBuilder/Handle.pm:586)
[11815] [Wed Nov 25 10:44:34 2015] [warning]: RT::Handle=HASH(0x4878b28)
couldn’t execute the query 'SELECT main.* FROM Queues main WHERE
(main.Lifecycle IS NULL OR main.Lifecycle = ‘’ OR main.Lifecycle = ‘0’)
ORDER BY main.SortOrder ASC, main.Name ASC ’ at
/usr/local/share/perl/5.20.2/DBIx/SearchBuilder/Handle.pm line 599, <>
line 1.
DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x4878b28),
“SELECT main.* FROM Queues main WHERE (main.Lifecycle IS NULL”…)
called at /usr/local/share/perl/5.20.2/DBIx/SearchBuilder.pm line 239
DBIx::SearchBuilder::_DoSearch(RT::Queues=HASH(0x996a060)) called at
/usr/local/src/rt-4.4/sbin/…/lib/RT/SearchBuilder.pm line 982
RT::SearchBuilder::_DoSearch(RT::Queues=HASH(0x996a060)) called at
/usr/local/share/perl/5.20.2/DBIx/SearchBuilder.pm line 507
DBIx::SearchBuilder::Next(RT::Queues=HASH(0x996a060)) called at
./etc/upgrade/4.0.9/content line 29
RT::Handle::ANON() called at
/usr/local/src/rt-4.4/sbin/…/lib/RT/Handle.pm line 866
eval {…} called at /usr/local/src/rt-4.4/sbin/…/lib/RT/Handle.pm
line 866
RT::Handle::InsertData(RT::Handle=HASH(0x4878b28),
"./etc/upgrade/4.0.9/content", undef) called at sbin/rt-setup-database
line 390
main::ANON() called at ./etc/upgrade/4.1.13/backcompat line 34
main::ANON(CODE(0x98e2f50)) called at sbin/rt-setup-database line 400
main::ANON() called at sbin/rt-setup-database line 403
main::action_insert(“backcompat”, ARRAY(0xe413f0), “action”, “upgrade”,
“prompt-for-dba-password”, 1, “datafile”, undef, “datadir”, …) called
at sbin/rt-setup-database line 571
main::action_upgrade(“action”, “upgrade”, “prompt-for-dba-password”, 1,
“package”, “RT”) called at sbin/rt-setup-database line 210
(/usr/share/perl/5.20/Carp.pm:169)

Then the upgrades to 4.0.12 through 4.1.0 run through without issue, but
after that:

Processing 4.1.1
Now populating database schema.
[11815] [Wed Nov 25 10:44:40 2015] [critical]: DBD::mysql::st execute
failed: Duplicate column name ‘Disabled’ at
/usr/local/src/rt-4.4/sbin/…/lib/RT/Handle.pm line 552.
(/usr/local/src/rt-4.4/sbin/…/lib/RT.pm:390)
DBD::mysql::st execute failed: Duplicate column name ‘Disabled’ at
/usr/local/src/rt-4.4/sbin/…/lib/RT/Handle.pm line 552.
Makefile:391: recipe for target ‘upgrade-database’ failed
make: *** [upgrade-database] Error 255

How can I fix this issue? Can’t find anything in the upgrade docs, let
alone UPGRADING.mysql, that points to a possible cause for these errors.

Thanks for any pointers!

Regards,

–ck

Hi again,

Now populating database schema.
[11815] [Wed Nov 25 10:44:40 2015] [critical]: DBD::mysql::st execute
failed: Duplicate column name ‘Disabled’ at
/usr/local/src/rt-4.4/sbin/…/lib/RT/Handle.pm line 552.
(/usr/local/src/rt-4.4/sbin/…/lib/RT.pm:390)
DBD::mysql::st execute failed: Duplicate column name ‘Disabled’ at
/usr/local/src/rt-4.4/sbin/…/lib/RT/Handle.pm line 552.
Makefile:391: recipe for target ‘upgrade-database’ failed
make: *** [upgrade-database] Error 255

FWIW, I manually fixed about a dozen errors (non-existant columns,
double columns and the likes) in the various database schemas and ran
make upgrade-database multiple times until it finally completed
successfully. Took me about an hour (and I’m not sure what caused it,
since my 4.0.8 installation is vanilla, database-wise).

–ck