Having trouble upgrading: Unknown column 'm.LastUpdatedBy' in 'on clause' at /usr/sbin/rt-validator

Hi,

I’m trying to upgrade a 3.6.1-4 (don’t ask) RT to 4.0.4-2 and I ran into
issues.

First of all: I am doing this upgrade (test) on a duplicate of the
actual production system, so no worries.

As part of the preparation before running the actual database upgrade, I ran

rt-validator --check

Which produced messages for about 20 occurrences like “Record #175 in
Groups has the same set of values as 191”

… but. After that, its also saying this:

[warning]: DBD::mysql::st execute failed: Unknown column
’m.LastUpdatedBy’ in ‘on clause’ at /usr/sbin/rt-validator line 1078.
(/usr/sbin/rt-validator:1078)
[crit]: DBD::mysql::st execute failed: Unknown column 'm.LastUpdatedBy’
in ‘on clause’ at /usr/sbin/rt-validator line 1078.
(/usr/share/request-tracker4/lib/RT.pm:351)
DBD::mysql::st execute failed: Unknown column ‘m.LastUpdatedBy’ in ‘on
clause’ at /usr/sbin/rt-validator line 1078.

It is entirely possible, that I have missed an essential upgrade step,
but I couldn’t find anything in UPGRADE-3.8 or UPGRADE-4.0 mentioning
LastUpdatedBy…?

Now, this warning+error also occur when trying to run --check --resolve,
so I assume it doesn’t actually resolve these conflicts.

At least that’s how I explained the following error, that occurs when
running the actual database upgrade afterwards:

[…]
Processing 3.7.81
Now populating database schema.
[crit]: DBD::mysql::st execute failed: Duplicate key name
’CachedGroupMembers3’ at /usr/share/request-tracker4/lib/RT/Handle.pm
line 515. (/usr/share/request-tracker4/lib/RT.pm:351)
DBD::mysql::st execute failed: Duplicate key name 'CachedGroupMembers3’
at /usr/share/request-tracker4/lib/RT/Handle.pm line 515.

Any pointers towards fixing this would be greatly appreciated!

Regards,
ms

Hi,

I’m trying to upgrade a 3.6.1-4 (don’t ask) RT to 4.0.4-2 and I ran into
issues.

First of all: I am doing this upgrade (test) on a duplicate of the
actual production system, so no worries.

As part of the preparation before running the actual database upgrade, I ran

rt-validator --check

RT 3.6.1 didn’t ship an rt-validator – it appeared in 3.8. Because the
schemas are different, you cannot simply run a current rt-validator
against the 3.6 schema, either.

At least that’s how I explained the following error, that occurs when
running the actual database upgrade afterwards:

This is orthogonal.

[…]
Processing 3.7.81
Now populating database schema.
[crit]: DBD::mysql::st execute failed: Duplicate key name
’CachedGroupMembers3’ at /usr/share/request-tracker4/lib/RT/Handle.pm
line 515. (/usr/share/request-tracker4/lib/RT.pm:351)
DBD::mysql::st execute failed: Duplicate key name 'CachedGroupMembers3’
at /usr/share/request-tracker4/lib/RT/Handle.pm line 515.

The 3.6 -> 3.8 upgrade steps attempt to create an index named
’CachedGroupMembers3’, which you appear to already have added by hand
locally. If you run ‘DROP INDEX CachedGroupMembers3’ the upgrade steps
should run correctly.

  • Alex