I can't seem to get my cascade action going here. I've got two tables defined as the following.
Can anyone tell me what's wrong? An update to system_rigs "id" won't cascade to the messages table.
Messages Table
CREATE TABLE `edr_messages` (
`message_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`rig_id` int(10) unsigned NOT NULL,
`message` text,
PRIMARY KEY (`message_id`,`rig_id`),
KEY `pkey` (`message_id`),
KEY `rig_id` (`rig_id`),
CONSTRAINT `edr_messages_ibfk_1` FOREIGN KEY (`rig_id`)
REFERENCES `system_rigs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1$$
Rigs Table
CREATE TABLE `system_rigs` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(45) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1$$