[racktables-users] Re: [racktables-users] Deleting objects doesn´t delete corresponding attributes

  • From: Denis Ovsienko <infrastation@xxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Thu, 17 Mar 2011 14:16:20 +0300

> Seems to me there´s a ON DELETE CASCADE option missing in the DB?

Could you check, that output of SHOW CREATE TABLE AttributeValue is as folows?

CREATE TABLE `AttributeValue` (
  `object_id` int(10) unsigned default NULL,
  `attr_id` int(10) unsigned default NULL,
  `string_value` char(128) default NULL,
  `uint_value` int(10) unsigned default NULL,
  `float_value` float default NULL,
  UNIQUE KEY `object_id` (`object_id`,`attr_id`),
  CONSTRAINT `AttributeValue-FK-object_id` FOREIGN KEY (`object_id`) REFERENCES 
`RackObject` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB;


-- 
 Denis Ovsienko

Other related posts:

  • » [racktables-users] Re: [racktables-users] Deleting objects doesn´t delete corresponding attributes - Denis Ovsienko