4.4.4 - 5.0.0 Database Upgrade Errors

Hi there,
I am trying to upgrade from a Debian Stretch, mariaDB 10.1.45, RT 4.4.4 to a Debian Buster, MariaDB 10.3.22, RT 5.0.0 and keep getting the following errors.

First when updating form 4.4.4 to 4.5.0:
[critical]: DBD::Pg::st execute failed: ERROR: column “hotlist” of relation “classes” does not exist at /opt/rt-5.0.0/sbin/…/lib/RT/Handle.pm line 548.

I have seen the other ticket which recommends skipping this step but when I do I get the error when going from 4.5.0 to 4.5.1:
[critical]: DBD::mysql::st execute failed: Table ‘Configurations’ already exists at /web/rt-dev/rt5/rt-5.0.0/sbin/…/lib/RT/Handle.pm line 548.

Which seems like a simple enough problem to fix so i Dropped that table and Continue with out error until it tries to upgrade from 4.5.6 to 4.5.7 where again i get:
[critical]: DBD::mysql::st execute failed: Table ‘AuthTokens’ already exists at /web/rt-dev/rt5/rt-5.0.0/sbin/…/lib/RT/Handle.pm line 548.

Dropping this table and continuing yields no more errors but when i log in as root i do not have access to most of the tabs at the top of the page including the admin panel, And my ldap users can not authenticate at all. Is there Something i am missing here?

Sounds like you’ve already run the upgrade. It’s trying to do things it’s already done.

yes, you can imagine my confusion as this is from a database dump that had not been upgraded.

When I did my upgrade, I inadvrtantly ran the upgrade on our old database as the RT_SiteConfig.pm was still referring to the old DB, so I ran into the same thing. The good thing is that all the changes seem to be backward compatible. RT4.4.4 didn’t seem to have any problem using the RT5.0.0 schema.

I still wonder why RT doesn’t have something like a “version” table in the database like a lot of other software has to track the database version.

Not quite versioning on the db, but you can see upgrade history at Admin->Tools->System configuration under “RT upgrade history”

According to the information Admin->Tools->System configuration I am working on an actual rt 4.4.4 system.

According to the information Admin->Tools->System configuration I am working on an actual rt 4.4.4 system.

What does the RT footer version say?

This also reports rt 4.4.4

If you have the rt5 code then you most likely need to run the ./configure line again and then make install

If you’ve built the new RT 5.0.0 in /opt/rt5 as it recommends, remember to check that your web server is actually pointing at that version, rathter than the old /opt/rt4 one. Easy to miss in the excitement of an upgrade. :slight_smile:

I’ve ran into the same problem, simply run the upgrade many times. Always run from the lsat successfull version. It needed about 4-5 tries for me ti finish. The message indicates that those upgrades have already succeeded

I had the same problem. With some debugging I figured out the reason this happened to me was because I did the following:

  1. I installed RT5 regularly (including basic database)
  2. Dumped my old RT 4.4.1 database
  3. Imported the dump into the already existing database along existing tables

So all tables existing in the old RT version were dropped and re-created, the new tables that didn’t exist yet were not dropped, thus leading to the ‘already exists’ errors.

Hope that helps some people having the same problem, probably not following the upgrade readme properly, just like me. :wink: