[rt-users] make upgrade-database error

Kai Storbeck kai at xs4all.nl
Mon Jun 17 17:29:40 EDT 2013

Hi Kevin,

Thanks for coming back on this. I only saw today that you responded.

For the search archive I'm including the DBD::Pg error again:
> DBD::Pg::st execute failed: ERROR:  more than one row returned by a
> subquery used as an expression

On 5/28/13 9:44 PM, Kevin Falcone wrote:
> On Fri, May 03, 2013 at 02:47:24PM +0200, Kai Storbeck wrote:
>> 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.
> Since this doesn't break on a 'clean' RT 3.8 with categories, I - like
> ruz - suspect some bad data in your tables.  I'd like to see what he
> requested.


>>> SELECT ObjectId, Content FROM Attributes WHERE
>>> Name = 'Category' AND  ObjectType = 'RT::CustomFieldValue';
> Or potentially a slightly modified form:
> SELECT Content, CustomFieldValues.id, CustomFieldValues.Name FROM
> Attributes, CustomFieldValues WHERE Attributes.Name = 'Category' AND
> ObjectType = 'RT::CustomFieldValue' AND CustomFieldValues.id =
> Attributes.ObjectId;

I've sent you the file off-list. There's a few fields that I'd prefer
not being archived.

> Tweak that to find the places with multiple values.

I'm not amazed by the output, did we insert disturbing data?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 906 bytes
Desc: OpenPGP digital signature
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130617/e94c5c1b/attachment.sig>

More information about the rt-users mailing list