Skip to content

Commit 5c23adf

Browse files
committed
CLOUDSTACK-4110: update user_ip_address.dnat_vmip field in 410to420 upgrade
(cherry picked from commit fa094a5)
1 parent 1a89bc0 commit 5c23adf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,8 @@ CREATE TABLE nic_secondary_ips (
423423

424424
ALTER TABLE `cloud`.`nics` ADD COLUMN secondary_ip SMALLINT DEFAULT '0' COMMENT 'secondary ips configured for the nic';
425425
ALTER TABLE `cloud`.`user_ip_address` ADD COLUMN dnat_vmip VARCHAR(40);
426+
UPDATE `cloud`.`user_ip_address`,`cloud`.`nics` SET `user_ip_address`.`dnat_vmip` = `nics`.`ip4_address`
427+
WHERE `user_ip_address`.`vm_id` = `nics`.`instance_id` AND `user_ip_address`.`network_id` = `nics`.`network_id` AND `user_ip_address`.`one_to_one_nat` = 1;
426428

427429
ALTER TABLE `cloud`.`alert` ADD COLUMN `archived` tinyint(1) unsigned NOT NULL DEFAULT 0;
428430
ALTER TABLE `cloud`.`event` ADD COLUMN `archived` tinyint(1) unsigned NOT NULL DEFAULT 0;

0 commit comments

Comments
 (0)