On Thu, Mar 8, 2012 at 07:39 Ruslan Zakirov <ruz at bestpractical.com>
wrote:
Hi,
Probably the following select returns more than one row per custom
field. You should delete incorrect records and re-run upgrade:
SELECT ObjectId, Content FROM Attributes WHERE
Name = 'Category' AND ObjectType = 'RT::CustomFieldValue';
Hi Ruz,
I dug this thread up from the archives, as I ran into the same error
while doing a test upgrade.
IIUC, every CustomFieldValue needs to be updated to contain a category
field from the old attributes table.
Rewriting the upgrade script for 3.9.5 into this:
UPDATE CustomFieldValues SET Category = att.Content
from Attributes att
WHERE att.ObjectId = CustomFieldValues.id
AND att.ObjectType = 'RT::CustomFieldValue'
AND att.Name = 'Category'
This fixed the problems for me.
Are you sure the original SQL is correct?
Regards,
Kai
On Thu, Mar 8, 2012 at 16:28, Joe Harris <drey111 at gmail.com> wrote:
I am going from 3.8.8 to 4.0.4 and am running into an issue during
the
upgrade-database part.
When it goes from 3.8.8 to 3.8.9 there is an error that shows:
[Thu Mar 8 12:09:37 2012] [warning]: Use of uninitialized value in
string eq at /usr/local/src/rt-4.0.4/sbin/../lib/RT/Template.pm line
627, <> line 1.
(/usr/local/src/rt-4.0.4/sbin/../lib/RT/Template.pm:627)
It looks like it gets past that and moves on through till it gets to
3.9.5 where it dumps me out:
Processing 3.9.5
Now populating database schema.
[Thu Mar 8 12:09:50 2012] [crit]: DBD::Pg::st execute failed: ERROR:
more than one row returned by a subquery used as an expression
(/usr/local/src/rt-4.0.4/sbin/../lib/RT.pm:341)
DBD::Pg::st execute failed: ERROR: more than one row returned by a
subquery used as an expression
make: *** [upgrade-database] Error 255
This is our second upgrade as we have 2 RT systems. The other
upgrade
(3.8.7 to 4.0.4) went flawless. This upgrade is from an RT
installation that has more custom fields and maybe a few more
templates/scrips, but essentially it is very similar to the original
one.
Any ideas?
Thanks in advance!
Joe
--
Best regards, Ruslan.