From ad508b7232e28ca02683bd8b60268cb87c71e36a Mon Sep 17 00:00:00 2001 From: frank Date: Fri, 9 Aug 2013 16:55:02 -0700 Subject: [PATCH] CLOUDSTACK-38333.0.6 to ASF 4.2 Upgrade: "cloud" Database Schema Inconsistencies on the Upgraded Setup - Tables "baremetal_dhcp_devices" and "baremetal_pxe_devices" CloudStack CLOUDSTACK-3612 3.0.6 to ASF 4.2 Upgrade: Database Schema Inconsistencies on the Upgraded Setup --- setup/db/db/schema-307to410.sql | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/setup/db/db/schema-307to410.sql b/setup/db/db/schema-307to410.sql index d9815b6163e..b682b4e4ea2 100644 --- a/setup/db/db/schema-307to410.sql +++ b/setup/db/db/schema-307to410.sql @@ -1539,6 +1539,12 @@ CREATE TABLE IF NOT EXISTS `cloud`.`baremetal_dhcp_devices`( PRIMARY KEY (`id`) )ENGINE=InnoDB DEFAULT CHARSET=utf8; +ALTER TABLE `cloud`.`baremetal_dhcp_devices` CHANGE COLUMN `nsp_id` `nsp_id` bigint unsigned DEFAULT NULL COMMENT 'Network Service Provider ID'; +ALTER TABLE `cloud`.`baremetal_dhcp_devices` CHANGE COLUMN `pod_id` `pod_id` bigint unsigned DEFAULT NULL COMMENT 'Pod id where this dhcp server in'; +ALTER TABLE `cloud`.`baremetal_dhcp_devices` CHANGE COLUMN `device_type` `device_type` varchar(255) DEFAULT NULL COMMENT 'type of the external device'; +ALTER TABLE `cloud`.`baremetal_dhcp_devices` CHANGE COLUMN `physical_network_id` `physical_network_id` bigint unsigned DEFAULT NULL COMMENT 'id of the physical network in to which external dhcp device is added'; +ALTER TABLE `cloud`.`baremetal_dhcp_devices` CHANGE COLUMN `host_id` `host_id` bigint unsigned DEFAULT NULL COMMENT 'host id coresponding to the external dhcp device'; + CREATE TABLE IF NOT EXISTS `cloud`.`baremetal_pxe_devices` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `uuid` varchar(40) UNIQUE, @@ -1550,6 +1556,11 @@ CREATE TABLE IF NOT EXISTS `cloud`.`baremetal_pxe_devices` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +ALTER TABLE `cloud`.`baremetal_pxe_devices` CHANGE COLUMN `nsp_id` `nsp_id` bigint unsigned DEFAULT NULL COMMENT 'Network Service Provider ID'; +ALTER TABLE `cloud`.`baremetal_pxe_devices` CHANGE COLUMN `pod_id` `pod_id` bigint unsigned DEFAULT NULL COMMENT 'Pod id where this pxe server in, for pxe per zone this field is null'; +ALTER TABLE `cloud`.`baremetal_pxe_devices` CHANGE COLUMN `device_type` `device_type` varchar(255) DEFAULT NULL COMMENT 'type of the pxe device'; +ALTER TABLE `cloud`.`baremetal_pxe_devices` CHANGE COLUMN `physical_network_id` `physical_network_id` bigint unsigned DEFAULT NULL COMMENT 'id of the physical network in to which external pxe device is added'; +ALTER TABLE `cloud`.`baremetal_pxe_devices` CHANGE COLUMN `host_id` `host_id` bigint unsigned DEFAULT NULL COMMENT 'host id coresponding to the external pxe device'; #drop tables as the feature is not a part of 4.2 DROP TABLE IF EXISTS `cloud`.`host_updates`; @@ -1572,4 +1583,4 @@ ALTER TABLE `cloud_usage`.`usage_storage` CHANGE COLUMN `virtual_size` `virtual_ ALTER TABLE `cloud_usage`.`cloud_usage` CHANGE COLUMN `virtual_size` `virtual_size1` bigint unsigned; 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)'; -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'; \ No newline at end of file +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';