Upgrading DB yields issues with duplicate or missing columns

I am attempting to upgrade our database from 4.2.10. Running ‘make upgrade-database’ yields several issues with there being columns that share names across tables or apparent missing columns that it is attempting to drop. Here are some examples:

Missing column

[25944] [Tue Oct 22 19:46:25 2019] [critical]: DBD::mysql::st execute failed: Can’t DROP ‘InitialPriority’; check that column/key exists at /path/sbin/…/lib/RT/Handle.pm line 553. (/path/sbin/…/lib/RT.pm:408)

Duplicate column

[25963] [Tue Oct 22 19:50:22 2019] [critical]: DBD::mysql::st execute failed: Duplicate column name ‘EntryHint’ at /path/sbin/…/lib/RT/Handle.pm line 553. (/path/sbin/. /lib/RT.pm:408) DBD::mysql::st execute failed: Duplicate column name ‘EntryHint’ at /path/sbin/…/lib/RT/Handle.pm line 553.

Manually removing or adding columns is quite tedious as there have been many instances of these issues. I verified the version of RT that I am upgrading from as 4.2.10.

Thanks for any help.

Is it possible that some of the upgrade steps have already been run in the past? Maybe the database isn’t in the 4.2.10 state any longer?

This seems unlikely, but it does not hurt to check. Is there a way to determine the database version?

There isn’t a method as far as I know, but searching the etc/upgrade code for where the ‘EntryHint’ column was added it looks like that was in version 4.3.1. If you have a back-up of your database before your started the upgrade process you could check to see if this column does already exist, that could point to it having been updated.