DBIx::SearchBuilder 1.83 can lead to warnings/errors during make upgrade-database in rt-6.0.2

Hi! Writing this mostly as some kind of PSA, I’ve not been able to pinpoint the exact problem (or even if there’s an actual problem).

TL;DR: use DBIx::SearchBuilder 1.82 and avoid 1.83.

Background:

  • I’m working on a project for packing RT+RTIR in a container image for Kubernetes deployment (https://codeberg.org/polettix/rtir-k8s/src/branch/burlish).
  • I’m automating the transformation of a backup (via pg_dump) from a release (e.g. 5.0.8/5.0.8) to another (e.g. 6.0.2/6.0.1).
  • I keep regenerating container images and from time to time I reinstall all modules to make sure that it all works fine from the ground up.

Today I did a new reinstallation of the modules and make database-upgrade rt-6.0.2 suddenly started printing a lot of warnings/errors. As I did not change anything in the build/bundle phase today, I figured that it had to do with some update in some module.

DBIx::SearchBuilder 1.83 is causing this mess. I did a new installation using DBIx::SearchBuilder 1.82 and the make database-upgrade command was warnings/errors free again.

Just for your information, the upgrade test is done using a very basic backup of a 5.0.8/5.0.8 database restored in a 6.0.2/6.0.1 container. So the upgrade process is done on very few records but at least I can see if it makes some smoke.

I can share a container image with the problem if you’re interested and don’t want to build it yourself.

Hope it helps!

Hey there,

We’re also seeing this during our container build phase with the make fixdeps phase, which we rely on to get the dependencies.

We resolved the problem in our Dockerfile by adding RUN cpanm DBIx::SearchBuilder@1.82 before the configure/makedeps phase, which will get the older version specifically. The condition is any version >= 1.80.

Also running version 6.0.2 here.

Best,

Luna

Could someone seeing this issue post some of the warnings and errors, assuming they don’t contain anything private?

Here you go.

This is the beginning of the upgrade process:

# make upgrade-database
/usr/bin/env -S perl -I/opt/rt6/local/lib/perl5 -I/opt/rt6/local/lib -I/opt/rt6/lib sbin/rt-setup-database --action upgrade --prompt-for-dba-password
In order to create or update your RT database, this script needs to connect to your  Pg instance on localhost (port '') as postgres
Please specify that user's database password below. If the user has no database
password, just press return.

Password:
Working with:
Type:   Pg
Host:   localhost
Port:
Name:   rt6
User:   rt_user
DBA:    postgres
Enter RT version you're upgrading from: 5.0.8

Going to apply following upgrades:
* 5.9.0
* 5.9.1
* 5.9.2
* 5.9.3
* 5.9.4
* 5.9.5
* 5.9.6
* 5.9.7
* 6.0.1

Enter RT version if you want to stop upgrade at some point,
  or leave it blank if you want apply above upgrades:

IT'S VERY IMPORTANT TO BACK UP BEFORE THIS STEP

Proceed [y/N]:y
[166] [Tue Mar 24 17:24:28 2026] [warning]: DBD::Pg::st execute failed: ERROR:  column "image" does not exist
LINE 1: SELECT City, Country, EmailAddress, Gecos, Image, ImageConte...
                                                   ^ at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 635, <STDIN> line 4. (/opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm:635)
[166] [Tue Mar 24 17:24:28 2026] [warning]: RT::Handle=HASH(0x57eb79c3ffd0) couldn't execute the query 'SELECT City, Country, EmailAddress, Gecos, Image, ImageContentType, Lang, Name, NickName, Organization, Password, RealName, SMIMECertificate, Timezone, id FROM Users WHERE LOWER(Name) = LOWER(?)' at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 648, <STDIN> line 4.
        DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79c3ffd0), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "RT_System") called at /app/rt-6.0.2/sbin/../lib/RT/Handle.pm line 3610
        RT::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79c3ffd0), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "RT_System") called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record.pm line 1268
        DBIx::SearchBuilder::Record::_LoadFromSQL(RT::CurrentUser=HASH(0x57eb79ce78b0), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "RT_System") called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record.pm line 1187
        DBIx::SearchBuilder::Record::LoadByCols(RT::CurrentUser=HASH(0x57eb79ce78b0), "LOWER(Name)", HASH(0x57eb79ce7058)) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record/Cachable.pm line 121
        DBIx::SearchBuilder::Record::Cachable::LoadByCols(RT::CurrentUser=HASH(0x57eb79ce78b0), "LOWER(Name)", HASH(0x57eb79ce7058)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 412
        RT::Record::LoadByCols(RT::CurrentUser=HASH(0x57eb79ce78b0), "Name", "RT_System") called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record.pm line 1103
        DBIx::SearchBuilder::Record::LoadByCol(RT::CurrentUser=HASH(0x57eb79ce78b0), "Name", "RT_System") called at /app/rt-6.0.2/sbin/../lib/RT/CurrentUser.pm line 201
        RT::CurrentUser::LoadByName(RT::CurrentUser=HASH(0x57eb79ce78b0), "RT_System") called at /app/rt-6.0.2/sbin/../lib/RT.pm line 708
        RT::InitSystemObjects("RT") called at sbin/rt-setup-database line 511
        main::action_upgrade("action", "upgrade", "package", "RT", "prompt-for-dba-password", 1) called at sbin/rt-setup-database line 210 (/usr/lib/x86_64-linux-gnu/perl-base/Carp.pm:292)
[166] [Tue Mar 24 17:24:28 2026] [warning]: DBD::Pg::st execute failed: ERROR:  column "image" does not exist
LINE 1: SELECT City, Country, EmailAddress, Gecos, Image, ImageConte...
                                                   ^ at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 635, <STDIN> line 4. (/opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm:635)
[166] [Tue Mar 24 17:24:28 2026] [warning]: RT::Handle=HASH(0x57eb79c3ffd0) couldn't execute the query 'SELECT City, Country, EmailAddress, Gecos, Image, ImageContentType, Lang, Name, NickName, Organization
, Password, RealName, SMIMECertificate, Timezone, id FROM Users WHERE LOWER(Name) = LOWER(?)' at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 648, <STDIN> line 4.
        DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79c3ffd0), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "Nobody") called at /app/rt-6.0.2/sbin/../lib/RT/Handle.
pm line 3610
        RT::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79c3ffd0), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "Nobody") called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record.pm
 line 1268
        DBIx::SearchBuilder::Record::_LoadFromSQL(RT::CurrentUser=HASH(0x57eb79ce6f80), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "Nobody") called at /opt/rt6/local/lib/perl5/DBIx/
SearchBuilder/Record.pm line 1187
        DBIx::SearchBuilder::Record::LoadByCols(RT::CurrentUser=HASH(0x57eb79ce6f80), "LOWER(Name)", HASH(0x57eb79c50c10)) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record/Cachable.pm line 121
        DBIx::SearchBuilder::Record::Cachable::LoadByCols(RT::CurrentUser=HASH(0x57eb79ce6f80), "LOWER(Name)", HASH(0x57eb79c50c10)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 412
        RT::Record::LoadByCols(RT::CurrentUser=HASH(0x57eb79ce6f80), "Name", "Nobody") called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record.pm line 1103
        DBIx::SearchBuilder::Record::LoadByCol(RT::CurrentUser=HASH(0x57eb79ce6f80), "Name", "Nobody") called at /app/rt-6.0.2/sbin/../lib/RT/CurrentUser.pm line 201
        RT::CurrentUser::LoadByName(RT::CurrentUser=HASH(0x57eb79ce6f80), "Nobody") called at /app/rt-6.0.2/sbin/../lib/RT.pm line 712
        RT::InitSystemObjects("RT") called at sbin/rt-setup-database line 511
        main::action_upgrade("action", "upgrade", "package", "RT", "prompt-for-dba-password", 1) called at sbin/rt-setup-database line 210 (/usr/lib/x86_64-linux-gnu/perl-base/Carp.pm:292)
[166] [Tue Mar 24 17:24:28 2026] [warning]: DBD::Pg::st execute failed: ERROR:  null value in column "lastupdatedby" of relation "attributes" violates not-null constraint
DETAIL:  Failing row contains (1, UpgradeHistory, null, BQsDAAAAAgQCAAAAAwQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJbml0..., storable, RT::System, 1, 1, 2026-03-24 17:14:25, null, 2026-03-24 17:24:28). at /
opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 635, <STDIN> line 4. (/opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm:635)
[166] [Tue Mar 24 17:24:28 2026] [warning]: RT::Handle=HASH(0x57eb79c3ffd0) couldn't execute the query 'UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ' at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Hand
le.pm line 648, <STDIN> line 4.
        DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79c3ffd0), "UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ", undef, 1) called at /app/rt-6.0.2/sbin/../lib/RT/Handle.pm line 3610
        RT::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79c3ffd0), "UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ", undef, 1) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 488
        DBIx::SearchBuilder::Handle::UpdateRecordValue(RT::Handle=HASH(0x57eb79c3ffd0), "Column", "LastUpdatedBy", "PrimaryKeys", HASH(0x57eb79e4b6c0), "Value", undef, "Table", ...) called at /opt/rt6/local
/lib/perl5/DBIx/SearchBuilder/Record.pm line 876
        DBIx::SearchBuilder::Record::__Set(RT::Attribute=HASH(0x57eb79c3f868), "Field", "LastUpdatedBy", "Value", undef) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record/Cachable.pm line 154
        DBIx::SearchBuilder::Record::Cachable::__Set(RT::Attribute=HASH(0x57eb79c3f868), "Field", "LastUpdatedBy", "Value", undef) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 520
        RT::Record::_SetLastUpdated(RT::Attribute=HASH(0x57eb79c3f868)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 491
        RT::Record::_Set(RT::Attribute=HASH(0x57eb79c3f868), "Field", "Content", "Value", "BQsDAAAAAgQCAAAAAwQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJb"...) called at /app/rt-6.0.2/sbin/../lib/RT/Attribute
.pm line 490
        RT::Attribute::_Set(RT::Attribute=HASH(0x57eb79c3f868), "Field", "Content", "Value", "BQsDAAAAAgQCAAAAAwQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJb"..., "RecordTransaction", undef) called at /app/rt
-6.0.2/sbin/../lib/RT/Attribute.pm line 304
        RT::Attribute::SetContent(RT::Attribute=HASH(0x57eb79c3f868), HASH(0x57eb79e6a970)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 213
        RT::Record::SetAttribute(RT::System=HASH(0x57eb79c51408), "Name", "UpgradeHistory", "Content", HASH(0x57eb79e6a970)) called at /app/rt-6.0.2/sbin/../lib/RT/System.pm line 329
        RT::System::AddUpgradeHistory(RT::System=HASH(0x57eb79c51408), "RT", HASH(0x57eb79c50b20)) called at sbin/rt-setup-database line 514
        main::action_upgrade("action", "upgrade", "package", "RT", "prompt-for-dba-password", 1) called at sbin/rt-setup-database line 210 (/usr/lib/x86_64-linux-gnu/perl-base/Carp.pm:292)
Processing 5.9.0
[166] [Tue Mar 24 17:24:28 2026] [warning]: DBD::Pg::st execute failed: ERROR:  null value in column "lastupdatedby" of relation "attributes" violates not-null constraint
DETAIL:  Failing row contains (1, UpgradeHistory, null, BQsDAAAAAgQCAAAABAQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJbml0..., storable, RT::System, 1, 1, 2026-03-24 17:14:25, null, 2026-03-24 17:24:28). at /
opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 635, <STDIN> line 4. (/opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm:635)
[166] [Tue Mar 24 17:24:28 2026] [warning]: RT::Handle=HASH(0x57eb79c3ffd0) couldn't execute the query 'UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ' at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Hand
le.pm line 648, <STDIN> line 4.
        DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79c3ffd0), "UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ", undef, 1) called at /app/rt-6.0.2/sbin/../lib/RT/Handle.pm line 3610
        RT::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79c3ffd0), "UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ", undef, 1) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 488
        DBIx::SearchBuilder::Handle::UpdateRecordValue(RT::Handle=HASH(0x57eb79c3ffd0), "IsSQLFunction", undef, "Table", "Attributes", "Value", undef, "Column", ...) called at /opt/rt6/local/lib/perl5/DBIx/
SearchBuilder/Record.pm line 876
        DBIx::SearchBuilder::Record::__Set(RT::Attribute=HASH(0x57eb79e47158), "Field", "LastUpdatedBy", "Value", undef) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record/Cachable.pm line 154
        DBIx::SearchBuilder::Record::Cachable::__Set(RT::Attribute=HASH(0x57eb79e47158), "Field", "LastUpdatedBy", "Value", undef) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 520
        RT::Record::_SetLastUpdated(RT::Attribute=HASH(0x57eb79e47158)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 491
        RT::Record::_Set(RT::Attribute=HASH(0x57eb79e47158), "Field", "Content", "Value", "BQsDAAAAAgQCAAAABAQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJb"...) called at /app/rt-6.0.2/sbin/../lib/RT/Attribute
.pm line 490
        RT::Attribute::_Set(RT::Attribute=HASH(0x57eb79e47158), "Field", "Content", "Value", "BQsDAAAAAgQCAAAABAQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJb"..., "RecordTransaction", undef) called at /app/rt
-6.0.2/sbin/../lib/RT/Attribute.pm line 304
        RT::Attribute::SetContent(RT::Attribute=HASH(0x57eb79e47158), HASH(0x57eb79d42e28)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 213
        RT::Record::SetAttribute(RT::System=HASH(0x57eb79c51408), "Name", "UpgradeHistory", "Content", HASH(0x57eb79d42e28)) called at /app/rt-6.0.2/sbin/../lib/RT/System.pm line 329
        RT::System::AddUpgradeHistory(RT::System=HASH(0x57eb79c51408), "RT", HASH(0x57eb79a4db20)) called at sbin/rt-setup-database line 549
        main::action_upgrade("action", "upgrade", "package", "RT", "prompt-for-dba-password", 1) called at sbin/rt-setup-database line 210 (/usr/lib/x86_64-linux-gnu/perl-base/Carp.pm:292)
[166] [Tue Mar 24 17:24:28 2026] [warning]: DBD::Pg::st execute failed: ERROR:  column "image" does not exist
LINE 1: SELECT City, Country, EmailAddress, Gecos, Image, ImageConte...
                                                   ^ at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 635, <STDIN> line 4. (/opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm:635)
[166] [Tue Mar 24 17:24:28 2026] [warning]: RT::Handle=HASH(0x57eb79d42dc8) couldn't execute the query 'SELECT City, Country, EmailAddress, Gecos, Image, ImageContentType, Lang, Name, NickName, Organization
, Password, RealName, SMIMECertificate, Timezone, id FROM Users WHERE LOWER(Name) = LOWER(?)' at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 648, <STDIN> line 4.
        DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "RT_System") called at /app/rt-6.0.2/sbin/../lib/RT/Hand
le.pm line 3610
        RT::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "RT_System") called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record
.pm line 1268
        DBIx::SearchBuilder::Record::_LoadFromSQL(RT::CurrentUser=HASH(0x57eb79d47fa0), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "RT_System") called at /opt/rt6/local/lib/perl5/DB
Ix/SearchBuilder/Record.pm line 1187
        DBIx::SearchBuilder::Record::LoadByCols(RT::CurrentUser=HASH(0x57eb79d47fa0), "LOWER(Name)", HASH(0x57eb79ced560)) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record/Cachable.pm line 121
        DBIx::SearchBuilder::Record::Cachable::LoadByCols(RT::CurrentUser=HASH(0x57eb79d47fa0), "LOWER(Name)", HASH(0x57eb79ced560)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 412
        RT::Record::LoadByCols(RT::CurrentUser=HASH(0x57eb79d47fa0), "Name", "RT_System") called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record.pm line 1103
        DBIx::SearchBuilder::Record::LoadByCol(RT::CurrentUser=HASH(0x57eb79d47fa0), "Name", "RT_System") called at /app/rt-6.0.2/sbin/../lib/RT/CurrentUser.pm line 201
        RT::CurrentUser::LoadByName(RT::CurrentUser=HASH(0x57eb79d47fa0), "RT_System") called at /app/rt-6.0.2/sbin/../lib/RT.pm line 708
        RT::InitSystemObjects() called at /app/rt-6.0.2/sbin/../lib/RT.pm line 200
        RT::Init() called at sbin/rt-setup-database line 362
        main::action_insert("backcompat", ARRAY(0x57eb7561f970), "datadir", "./etc/upgrade/5.9.0", "prompt-for-dba-password", 1, "datafile", undef, ...) called at sbin/rt-setup-database line 574
        main::action_upgrade("action", "upgrade", "package", "RT", "prompt-for-dba-password", 1) called at sbin/rt-setup-database line 210 (/usr/lib/x86_64-linux-gnu/perl-base/Carp.pm:292)
[166] [Tue Mar 24 17:24:28 2026] [warning]: DBD::Pg::st execute failed: ERROR:  column "image" does not exist
LINE 1: SELECT City, Country, EmailAddress, Gecos, Image, ImageConte...
                                                   ^ at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 635, <STDIN> line 4. (/opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm:635)
[166] [Tue Mar 24 17:24:28 2026] [warning]: RT::Handle=HASH(0x57eb79d42dc8) couldn't execute the query 'SELECT City, Country, EmailAddress, Gecos, Image, ImageContentType, Lang, Name, NickName, Organization
, Password, RealName, SMIMECertificate, Timezone, id FROM Users WHERE LOWER(Name) = LOWER(?)' at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 648, <STDIN> line 4.
        DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "Nobody") called at /app/rt-6.0.2/sbin/../lib/RT/Handle.
pm line 3610
        RT::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "Nobody") called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record.pm
 line 1268
        DBIx::SearchBuilder::Record::_LoadFromSQL(RT::CurrentUser=HASH(0x57eb79ced458), "SELECT City, Country, EmailAddress, Gecos, Image, ImageConten"..., "Nobody") called at /opt/rt6/local/lib/perl5/DBIx/
SearchBuilder/Record.pm line 1187
        DBIx::SearchBuilder::Record::LoadByCols(RT::CurrentUser=HASH(0x57eb79ced458), "LOWER(Name)", HASH(0x57eb79ced650)) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record/Cachable.pm line 121
        DBIx::SearchBuilder::Record::Cachable::LoadByCols(RT::CurrentUser=HASH(0x57eb79ced458), "LOWER(Name)", HASH(0x57eb79ced650)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 412
        RT::Record::LoadByCols(RT::CurrentUser=HASH(0x57eb79ced458), "Name", "Nobody") called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record.pm line 1103
        DBIx::SearchBuilder::Record::LoadByCol(RT::CurrentUser=HASH(0x57eb79ced458), "Name", "Nobody") called at /app/rt-6.0.2/sbin/../lib/RT/CurrentUser.pm line 201
        RT::CurrentUser::LoadByName(RT::CurrentUser=HASH(0x57eb79ced458), "Nobody") called at /app/rt-6.0.2/sbin/../lib/RT.pm line 712
        RT::InitSystemObjects() called at /app/rt-6.0.2/sbin/../lib/RT.pm line 200
        RT::Init() called at sbin/rt-setup-database line 362
        main::action_insert("backcompat", ARRAY(0x57eb7561f970), "datadir", "./etc/upgrade/5.9.0", "prompt-for-dba-password", 1, "datafile", undef, ...) called at sbin/rt-setup-database line 574
        main::action_upgrade("action", "upgrade", "package", "RT", "prompt-for-dba-password", 1) called at sbin/rt-setup-database line 210 (/usr/lib/x86_64-linux-gnu/perl-base/Carp.pm:292)
[166] [Tue Mar 24 17:24:29 2026] [warning]: Use of uninitialized value in numeric eq (==) at /app/rt-6.0.2/sbin/../lib/RT/Principal.pm line 291. (/app/rt-6.0.2/sbin/../lib/RT/Principal.pm:291)

More of the last line above (or a slight variation of it), then:

Now inserting data.
[166] [Tue Mar 24 17:24:29 2026] [warning]: DBD::Pg::st execute failed: ERROR:  null value in column "lastupdatedby" of relation "attributes" violates not-null constraint
DETAIL:  Failing row contains (1, UpgradeHistory, null, BQsDAAAAAgQCAAAABQQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJbml0..., storable, RT::System, 1, 1, 2026-03-24 17:14:25, null, 2026-03-24 17:24:29). at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 635, <$handle> line 1. (/opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm:635)
[166] [Tue Mar 24 17:24:29 2026] [warning]: RT::Handle=HASH(0x57eb79d42dc8) couldn't execute the query 'UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ' at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 648, <$handle> line 1.
        DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ", undef, 1) called at /app/rt-6.0.2/sbin/../lib/RT/Handle.pm line 3610
        RT::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ", undef, 1) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 488
        DBIx::SearchBuilder::Handle::UpdateRecordValue(RT::Handle=HASH(0x57eb79d42dc8), "Value", undef, "PrimaryKeys", HASH(0x57eb80882480), "Column", "LastUpdatedBy", "Table", ...) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record.pm line 876
        DBIx::SearchBuilder::Record::__Set(RT::Attribute=HASH(0x57eb79c3f700), "Field", "LastUpdatedBy", "Value", undef) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record/Cachable.pm line 154
        DBIx::SearchBuilder::Record::Cachable::__Set(RT::Attribute=HASH(0x57eb79c3f700), "Field", "LastUpdatedBy", "Value", undef) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 520
        RT::Record::_SetLastUpdated(RT::Attribute=HASH(0x57eb79c3f700)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 491
        RT::Record::_Set(RT::Attribute=HASH(0x57eb79c3f700), "Field", "Content", "Value", "BQsDAAAAAgQCAAAABQQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJb"...) called at /app/rt-6.0.2/sbin/../lib/RT/Attribute.pm line 490
        RT::Attribute::_Set(RT::Attribute=HASH(0x57eb79c3f700), "Field", "Content", "Value", "BQsDAAAAAgQCAAAABQQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJb"..., "RecordTransaction", undef) called at /app/rt-6.0.2/sbin/../lib/RT/Attribute.pm line 304
        RT::Attribute::SetContent(RT::Attribute=HASH(0x57eb79c3f700), HASH(0x57eb79ce95b0)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 213
        RT::Record::SetAttribute(RT::System=HASH(0x57eb79ce7058), "Name", "UpgradeHistory", "Content", HASH(0x57eb79ce95b0)) called at /app/rt-6.0.2/sbin/../lib/RT/System.pm line 329
        RT::System::AddUpgradeHistory(RT::System=HASH(0x57eb79ce7058), "RT", HASH(0x57eb75600780)) called at sbin/rt-setup-database line 389
        main::action_insert("backcompat", ARRAY(0x57eb7561f970), "datadir", "./etc/upgrade/5.9.0", "prompt-for-dba-password", 1, "datafile", undef, ...) called at sbin/rt-setup-database line 574
        main::action_upgrade("action", "upgrade", "package", "RT", "prompt-for-dba-password", 1) called at sbin/rt-setup-database line 210 (/usr/lib/x86_64-linux-gnu/perl-base/Carp.pm:292)
[166] [Tue Mar 24 17:24:29 2026] [warning]: DBD::Pg::st execute failed: ERROR:  column main.image does not exist
LINE 1: ....FreeformContactInfo, main.Gecos, main.HomePhone, main.Image...
                                                             ^ at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 635. (/opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm:635)
[166] [Tue Mar 24 17:24:29 2026] [warning]: RT::Handle=HASH(0x57eb79d42dc8) couldn't execute the query 'SELECT DISTINCT main.Address1, main.Address2, main.AuthToken, main.City, main.Comments, main.Country, main.Created, main.Creator, main.EmailAddress, main.FreeformContactInfo, main.Gecos, main.HomePhone, main.Image, main.ImageContentType, main.Lang, main.LastUpdated, main.LastUpdatedBy, main.MobilePhone, main.Name, main.NickName, main.Organization, main.PagerPhone, main.Password, main.RealName, main.SMIMECertificate, main.Signature, main.State, main.Timezone, main.WorkPhone, main.Zip, main.id FROM Users main JOIN Attributes Attributes_2  ON ( Attributes_2.ObjectId = main.id ) JOIN Principals Principals_1  ON ( Principals_1.id = main.id )  WHERE (Attributes_2.Name = ?) AND (Attributes_2.ObjectType = ?) AND (Principals_1.PrincipalType = ?)  ORDER BY main.Name ASC ' at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 648.
        DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "SELECT DISTINCT main.Address1, main.Address2, main.AuthToken,"..., "Pref-RT::System-1", "RT::User", "User") called at /app/rt-6.0.2/sbin/../lib/RT/Handle.pm line 3610
        RT::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "SELECT DISTINCT main.Address1, main.Address2, main.AuthToken,"..., "Pref-RT::System-1", "RT::User", "User") called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder.pm line 255
        DBIx::SearchBuilder::_DoSearch(RT::Users=HASH(0x57eb79dd6c78)) called at /app/rt-6.0.2/sbin/../lib/RT/SearchBuilder.pm line 1100
        RT::SearchBuilder::_DoSearch(RT::Users=HASH(0x57eb79dd6c78)) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder.pm line 705
        DBIx::SearchBuilder::Next(RT::Users=HASH(0x57eb79dd6c78)) called at /app/rt-6.0.2/etc/upgrade/5.9.0/content line 29
        RT::Handle::__ANON__("admin_dbh", DBI::db=HASH(0x57eb79de1688)) called at /app/rt-6.0.2/sbin/../lib/RT/Handle.pm line 949
        eval {...} called at /app/rt-6.0.2/sbin/../lib/RT/Handle.pm line 949
        RT::Handle::InsertData(RT::Handle=HASH(0x57eb79d42dc8), "./etc/upgrade/5.9.0/content", undef, "admin_dbh", DBI::db=HASH(0x57eb79de1688)) called at sbin/rt-setup-database line 393
        main::__ANON__() called at ./etc/upgrade/5.9.7/backcompat line 46
        main::__ANON__(CODE(0x57eb80873ac8)) called at sbin/rt-setup-database line 403
        main::__ANON__() called at sbin/rt-setup-database line 406
        main::action_insert("backcompat", ARRAY(0x57eb7561f970), "datadir", "./etc/upgrade/5.9.0", "prompt-for-dba-password", 1, "datafile", undef, ...) called at sbin/rt-setup-database line 574
        main::action_upgrade("action", "upgrade", "package", "RT", "prompt-for-dba-password", 1) called at sbin/rt-setup-database line 210 (/usr/lib/x86_64-linux-gnu/perl-base/Carp.pm:292)
[166] [Tue Mar 24 17:24:29 2026] [warning]: DBD::Pg::st execute failed: ERROR:  null value in column "lastupdatedby" of relation "attributes" violates not-null constraint
DETAIL:  Failing row contains (1, UpgradeHistory, null, BQsDAAAAAgQCAAAABgQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJbml0..., storable, RT::System, 1, 1, 2026-03-24 17:14:25, null, 2026-03-24 17:24:29). at /
opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 635. (/opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm:635)
[166] [Tue Mar 24 17:24:29 2026] [warning]: RT::Handle=HASH(0x57eb79d42dc8) couldn't execute the query 'UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ' at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Hand
le.pm line 648.
        DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ", undef, 1) called at /app/rt-6.0.2/sbin/../lib/RT/Handle.pm line 3610
        RT::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ", undef, 1) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 488
        DBIx::SearchBuilder::Handle::UpdateRecordValue(RT::Handle=HASH(0x57eb79d42dc8), "Table", "Attributes", "Value", undef, "PrimaryKeys", HASH(0x57eb79e39040), "Column", ...) called at /opt/rt6/local/li
b/perl5/DBIx/SearchBuilder/Record.pm line 876
        DBIx::SearchBuilder::Record::__Set(RT::Attribute=HASH(0x57eb79d48000), "Field", "LastUpdatedBy", "Value", undef) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record/Cachable.pm line 154
        DBIx::SearchBuilder::Record::Cachable::__Set(RT::Attribute=HASH(0x57eb79d48000), "Field", "LastUpdatedBy", "Value", undef) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 520
        RT::Record::_SetLastUpdated(RT::Attribute=HASH(0x57eb79d48000)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 491
        RT::Record::_Set(RT::Attribute=HASH(0x57eb79d48000), "Field", "Content", "Value", "BQsDAAAAAgQCAAAABgQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJb"...) called at /app/rt-6.0.2/sbin/../lib/RT/Attribute
.pm line 490
        RT::Attribute::_Set(RT::Attribute=HASH(0x57eb79d48000), "Field", "Content", "Value", "BQsDAAAAAgQCAAAABgQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJb"..., "RecordTransaction", undef) called at /app/rt
-6.0.2/sbin/../lib/RT/Attribute.pm line 304
        RT::Attribute::SetContent(RT::Attribute=HASH(0x57eb79d48000), HASH(0x57eb79d483c0)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 213
        RT::Record::SetAttribute(RT::System=HASH(0x57eb79ce7058), "Name", "UpgradeHistory", "Content", HASH(0x57eb79d483c0)) called at /app/rt-6.0.2/sbin/../lib/RT/System.pm line 329
        RT::System::AddUpgradeHistory(RT::System=HASH(0x57eb79ce7058), "RT", HASH(0x57eb75600780)) called at sbin/rt-setup-database line 419
        main::action_insert("backcompat", ARRAY(0x57eb7561f970), "datadir", "./etc/upgrade/5.9.0", "prompt-for-dba-password", 1, "datafile", undef, ...) called at sbin/rt-setup-database line 574
        main::action_upgrade("action", "upgrade", "package", "RT", "prompt-for-dba-password", 1) called at sbin/rt-setup-database line 210 (/usr/lib/x86_64-linux-gnu/perl-base/Carp.pm:292)
[166] [Tue Mar 24 17:24:29 2026] [warning]: DBD::Pg::st execute failed: ERROR:  null value in column "lastupdatedby" of relation "attributes" violates not-null constraint
DETAIL:  Failing row contains (1, UpgradeHistory, null, BQsDAAAAAgQCAAAABwQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJbml0..., storable, RT::System, 1, 1, 2026-03-24 17:14:25, null, 2026-03-24 17:24:29). at /
opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 635. (/opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm:635)
[166] [Tue Mar 24 17:24:29 2026] [warning]: RT::Handle=HASH(0x57eb79d42dc8) couldn't execute the query 'UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ' at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Hand
le.pm line 648.
        DBIx::SearchBuilder::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ", undef, 1) called at /app/rt-6.0.2/sbin/../lib/RT/Handle.pm line 3610
        RT::Handle::SimpleQuery(RT::Handle=HASH(0x57eb79d42dc8), "UPDATE Attributes SET LastUpdatedBy=? WHERE id=? ", undef, 1) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Handle.pm line 488
        DBIx::SearchBuilder::Handle::UpdateRecordValue(RT::Handle=HASH(0x57eb79d42dc8), "Table", "Attributes", "PrimaryKeys", HASH(0x57eb80881b38), "Column", "LastUpdatedBy", "Value", ...) called at /opt/rt
6/local/lib/perl5/DBIx/SearchBuilder/Record.pm line 876
        DBIx::SearchBuilder::Record::__Set(RT::Attribute=HASH(0x57eb79de13b8), "Field", "LastUpdatedBy", "Value", undef) called at /opt/rt6/local/lib/perl5/DBIx/SearchBuilder/Record/Cachable.pm line 154
        DBIx::SearchBuilder::Record::Cachable::__Set(RT::Attribute=HASH(0x57eb79de13b8), "Field", "LastUpdatedBy", "Value", undef) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 520
        RT::Record::_SetLastUpdated(RT::Attribute=HASH(0x57eb79de13b8)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 491
        RT::Record::_Set(RT::Attribute=HASH(0x57eb79de13b8), "Field", "Content", "Value", "BQsDAAAAAgQCAAAABwQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJb"...) called at /app/rt-6.0.2/sbin/../lib/RT/Attribute
.pm line 490
        RT::Attribute::_Set(RT::Attribute=HASH(0x57eb79de13b8), "Field", "Content", "Value", "BQsDAAAAAgQCAAAABwQDAAAACAoGaW5zZXJ0AAAABmFjdGlvbgEAAKMqIyBJb"..., "RecordTransaction", undef) called at /app/rt
-6.0.2/sbin/../lib/RT/Attribute.pm line 304
        RT::Attribute::SetContent(RT::Attribute=HASH(0x57eb79de13b8), HASH(0x57eb79dd6d20)) called at /app/rt-6.0.2/sbin/../lib/RT/Record.pm line 213
        RT::Record::SetAttribute(RT::System=HASH(0x57eb79ce7058), "Name", "UpgradeHistory", "Content", HASH(0x57eb79dd6d20)) called at /app/rt-6.0.2/sbin/../lib/RT/System.pm line 329
        RT::System::AddUpgradeHistory(RT::System=HASH(0x57eb79ce7058), "RT", HASH(0x57eb80881e38)) called at sbin/rt-setup-database line 583
        main::action_upgrade("action", "upgrade", "package", "RT", "prompt-for-dba-password", 1) called at sbin/rt-setup-database line 210 (/usr/lib/x86_64-linux-gnu/perl-base/Carp.pm:292)
Processing 5.9.1
[166] [Tue Mar 24 17:24:29 2026] [warning]: DBD::Pg::st execute failed: ERROR:  null value in column "lastupdatedby" of relation "attributes" violates not-null constraint

… and then more.

I can upload the whole output (captured via script) if you need more. Or I can upload the container image with all things inside so that you can run it directly.

The backup I’m trying to upgrade from is taken from a brand-new 5.0.8/5.0.8 (RT/RTIR) installation with no tickets added.

Thanks –Flavio.

Thanks, we have been able to replicate this on our side. We’re working on an update. A new version of DBIx::SearchBuilder will be coming soon!

Version 1.84 of DBIx::SearchBuilder is now available and it should resolve the issue with 1.83. Let us know if you still see any errors when running upgrades.

No more warnings/errors on that use case with 1.84, thanks!

1 Like