db: Re-enable db foreign key checking at the end of the upgrade path Signed-off-by: Rohit Yadav <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/755ddc52 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/755ddc52 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/755ddc52 Branch: refs/heads/master Commit: 755ddc52d17568daee55b05e120652a703e70fbe Parents: d37ed18 Author: Rohit Yadav <[email protected]> Authored: Tue Feb 26 12:32:21 2013 +0530 Committer: Rohit Yadav <[email protected]> Committed: Tue Feb 26 12:32:21 2013 +0530 ---------------------------------------------------------------------- setup/db/db/schema-410to420.sql | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/755ddc52/setup/db/db/schema-410to420.sql ---------------------------------------------------------------------- diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql index 6c831f0..4349bd0 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;
