Skip to content

Commit 755ddc5

Browse files
committed
db: Re-enable db foreign key checking at the end of the upgrade path
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent d37ed18 commit 755ddc5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎setup/db/db/schema-410to420.sql‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-- Schema upgrade from 4.1.0 to 4.2.0;
2020
--;
2121

22+
-- Disable foreign key checking
2223
SET foreign_key_checks = 0;
2324

2425
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` (
9798
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
9899

99100

100-
SET foreign_key_checks = 1;
101101

102102
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');
103103

@@ -109,3 +109,6 @@ CREATE TABLE `cloud`.`user_vm_clone_setting` (
109109

110110

111111
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');
112+
113+
-- Re-enable foreign key checking, at the end of the upgrade path
114+
SET foreign_key_checks = 1;

0 commit comments

Comments
 (0)