Skip to content

Commit a0cff4c

Browse files
committed
schema: fix foreign key checks for 3.0.7 to 4.1.0 upgrade path
Without this upgrades from 3.0.7 version fails. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 06de2d6 commit a0cff4c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎setup/db/db/schema-307to410.sql‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
--;
2121

2222

23+
SET foreign_key_checks = 0;
2324

2425
-- DB upgrade steps from 302-40
2526
CREATE TABLE `cloud`.`external_nicira_nvp_devices` (
@@ -1508,7 +1509,6 @@ CREATE TABLE `cloud`.`ucs_manager` (
15081509
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
15091510

15101511

1511-
SET foreign_key_checks = 1;
15121512

15131513
UPDATE `cloud`.`configuration` SET value='KVM,XenServer,VMware,Ovm' WHERE name='hypervisor.list';
15141514

@@ -1585,3 +1585,5 @@ ALTER TABLE `cloud_usage`.`cloud_usage` CHANGE COLUMN `virtual_size` `virtual_si
15851585

15861586
ALTER TABLE `cloud`.`network_offerings` CHANGE COLUMN `concurrent_connections` `concurrent_connections1` int(10) unsigned COMMENT 'Load Balancer(haproxy) maximum number of concurrent connections(global max)';
15871587
ALTER TABLE `cloud`.`volumes` CHANGE COLUMN `iso_id` `iso_id1` bigint(20) unsigned COMMENT 'The id of the iso from which the volume was created';
1588+
1589+
SET foreign_key_checks = 1;

0 commit comments

Comments
 (0)