[racktables-users] Re: problem updating from 0.19.10 to 0.19.13

  • From: Denis Ovsienko <infrastation@xxxxxxxxx>
  • To: "racktables-users@xxxxxxxxxxxxx" <racktables-users@xxxxxxxxxxxxx>
  • Date: Wed, 22 Aug 2012 10:40:53 +0400

22.08.2012, 01:32, "Tim Messer" <tmesser@xxxxxxxx>:
> Hi,
>
> I upgraded from 0.19.10 to 0.19.13 today and encountered this error
> during the 0.19.11 batch:
>
> ALTER TABLE AttributeValue ADD CONSTRAINT `AttributeValue-FK-map`
> FOREIGN KEY (`object_tid`, `attr_id`) REFERENCES `AttributeMap`
> (`objtype_id`, `attr_id`) -- Cannot add or update a child row: a foreign
> key constraint fails (`racktables_db/#sql-7f23_53e0`, CONSTRAINT
> `AttributeValue-FK-map` FOREIGN KEY (`object_tid`, `attr_id`) REFERENCES
> `AttributeMap` (`objtype_id`, `attr_id`))
>
> The other batches executed without error, and my installation appears to
> be functioning normally.  Do I need to fix this error, and how do I go
> about doing that?

Hello.

Can you send me privately the output of this SQL query?

SELECT AV.object_id, AV.attr_id, RO.objtype_id FROM
AttributeValue AS AV INNER JOIN RackObject AS RO ON AV.object_id = RO.id
LEFT JOIN AttributeMap AS AM ON AV.attr_id = AM.attr_id AND RO.objtype_id = 
AM.objtype_id
WHERE AM.attr_id IS NULL;

-- 
    Denis Ovsienko

Other related posts: