Issue with CustomFields.basedon while upgrading rt-setup-database-4 --action upgrade --upgrade-from 4.2.8 --upgrade-to 4.4.3


I got his error while upgrading from 4.2.8 to 4.4.3:
[3335] [Wed Jul 29 14:25:17 2020] [warning]: DBD::Pg::st execute failed: ERROR: column “basedon” does not exist
LINE 1: SELECT basedon FROM CustomFields WHERE id = $1
^ at /usr/share/perl5/DBIx/SearchBuilder/ line 586. (/usr/share/perl5/DBIx/SearchBuilder/
[3335] [Wed Jul 29 14:25:17 2020] [warning]: RT::Handle=HASH(0x5afe9414) couldn’t execute the query ‘SELECT basedon FROM CustomFields WHERE id = ?’ at /usr/share/perl5/DBIx/SearchBuilder/ line 599.
DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x5afe9414), “SELECT basedon FROM CustomFields WHERE id = ?”, 2) called at /usr/share/perl5/DBIx/SearchBuilder/ line 714
DBIx::SearchBuilder::Record::__Value(RT::CustomField=HASH(0x5b0a979c), “BasedOn”) called at /usr/share/request-tracker4/lib/RT/ line 610
RT::Record::__Value(RT::CustomField=HASH(0x5b0a979c), “BasedOn”) called at /usr/share/request-tracker4/lib/RT/ line 1162
RT::CustomField::_Value(RT::CustomField=HASH(0x5b0a979c), “BasedOn”) called at /usr/share/perl5/DBIx/SearchBuilder/ line 423
DBIx::SearchBuilder::Record::ANON(RT::CustomField=HASH(0x5b0a979c)) called at /usr/share/request-tracker4/lib/RT/ line 2162
RT::CustomField::BasedOnObj(RT::CustomField=HASH(0x5b0a979c)) called at /usr/share/request-tracker4/etc/upgrade/4.3.6/content line 13
RT::Handle::ANON() called at /usr/share/request-tracker4/lib/RT/ line 925
eval {…} called at /usr/share/request-tracker4/lib/RT/ line 925
RT::Handle::InsertData(RT::Handle=HASH(0x5afe9414), “/usr/share/request-tracker4/etc/upgrade/4.3.6/content”, undef) called at /usr/sbin/rt-setup-database-4 line 388
main::ANON() called at /usr/sbin/rt-setup-database-4 line 401
main::action_insert(“datafile”, undef, “package”, “RT”, “action”, “upgrade”, “backcompat”, ARRAY(0x58683f14), …) called at /usr/sbin/rt-setup-database-4 line 569
main::action_upgrade(“action”, “upgrade”, “package”, “RT”, “upgrade-from”, “4.2.8”, “upgrade-to”, “4.4.3”) called at /usr/sbin/rt-setup-database-4 line 210 (/usr/share/perl/5.28/

Anything special I should do?

Also, I got this:
[3335] [Wed Jul 29 14:25:26 2020] [warning]: Unable to load scrip On TimeWorked Change Update User TimeWorked: Couldn’t find row. If you renamed this scrip, you can manually disable it as it is no longer needed. (/usr/share/request-tracker4/etc/upgrade/4.4.2/content:66)

but there I think it’s harmless since I don’t think I used TimeWorked.

Thank you for your input.

Did you upgrade from RT3 in the past? It looks like basedon was added as a column in RT 3.9.7

Yes I did. A few years ago. I thought I run the upgrade script then. Should I re-run the upgrade script from RT 3.9.7?

I’d take a look at etc/upgrade/3.9.7/schema.mysql ( Or whichever DB type you’re using ) and see if you’re missing any other columns like RenderType and ValuesClass in the CustomFields table first


thank you. After a closer look, all of the changes in /usr/share/request-tracker4/etc/upgrade/3.9.7/schema.Pg were already applied, except
ALTER TABLE CustomFields
which I just did!