From 7055b2280f9cc7b20d7ab66cebade705b2a105b8 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 14 Aug 2015 13:12:29 +0530 Subject: [PATCH] CLOUDSTACK-8696: Port Rajani's regions fix to 451to452 sql upgrade path Upgrade paths from 4.5.1 exists to both 4.5.2, and 4.6.0. Since 4.5.2 and 4.6.0 are not release, and the bug affects 4.5 branch; this patch aims to port that fix from master to both 4.5/master branches. Ported from commit b6a7804 (cherry picked from commit a8af6f3658ded6e1c3538082fb4abeb7f30c420d) Signed-off-by: Rohit Yadav --- setup/db/db/schema-451to452.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup/db/db/schema-451to452.sql b/setup/db/db/schema-451to452.sql index 5c89008a83e..d0aeabf3d1b 100644 --- a/setup/db/db/schema-451to452.sql +++ b/setup/db/db/schema-451to452.sql @@ -33,3 +33,7 @@ CREATE TABLE `cloud`.`saml_token` ( PRIMARY KEY (`id`), CONSTRAINT `fk_saml_token__domain_id` FOREIGN KEY(`domain_id`) REFERENCES `domain`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +SET foreign_key_checks = 0; +ALTER TABLE `cloud`.`region` MODIFY `id` int unsigned UNIQUE NOT NULL; +SET foreign_key_checks = 1;