deadlock on host_details: Missed adding the unique key constraint needed on host_details table in create_schema

This commit is contained in:
Prachi Damle 2012-09-06 16:35:28 -07:00 committed by Alex Huang
parent e1b3f0cf87
commit 176259e7d5
1 changed files with 2 additions and 1 deletions

View File

@ -829,7 +829,8 @@ CREATE TABLE `cloud`.`host_details` (
`name` varchar(255) NOT NULL,
`value` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `fk_host_details__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE
CONSTRAINT `fk_host_details__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE,
CONSTRAINT UNIQUE KEY `uk_host_id_name` (`host_id`, `name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`mshost` (