From 755ddc52d17568daee55b05e120652a703e70fbe Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Tue, 26 Feb 2013 12:32:21 +0530 Subject: [PATCH] db: Re-enable db foreign key checking at the end of the upgrade path Signed-off-by: Rohit Yadav --- setup/db/db/schema-410to420.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql index 6c831f0580c..4349bd08fc8 100644 --- a/setup/db/db/schema-410to420.sql +++ b/setup/db/db/schema-410to420.sql @@ -19,6 +19,7 @@ -- Schema upgrade from 4.1.0 to 4.2.0; --; +-- Disable foreign key checking SET foreign_key_checks = 0; ALTER TABLE `cloud`.`hypervisor_capabilities` ADD COLUMN `max_hosts_per_cluster` int unsigned DEFAULT NULL COMMENT 'Max. hosts in cluster supported by hypervisor'; @@ -97,7 +98,6 @@ CREATE TABLE `vpc_service_map` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -SET foreign_key_checks = 1; INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vm.instancename.flag', 'false', 'Append guest VM display Name (if set) to the internal name of the VM'); @@ -109,3 +109,6 @@ CREATE TABLE `cloud`.`user_vm_clone_setting` ( INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'UserVmManager', 'vmware.create.full.clone' , 'false', 'If set to true, creates VMs as full clones on ESX hypervisor'); + +-- Re-enable foreign key checking, at the end of the upgrade path +SET foreign_key_checks = 1;