Bug CS-15020: DB inconsistencies after upgrade from Acton to Bonita

Description:

	Putting in table creation DMLs in upgrade script
	when upgrading from Acton (3.0.2) to Bonita (3.0.3).
	Please note that the field names in the tables need
	to be changed as per naming conventions. Those changes
	will be checked in in an upcoming commit.
This commit is contained in:
Vijayendra Bhamidipati 2012-05-21 12:23:49 -07:00
parent 74addad480
commit 77e914bc0a
1 changed files with 45 additions and 0 deletions

View File

@ -126,3 +126,48 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'manag
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'vmware.public.network.vswitch.type', 'standard', 'Specify type of (standard/nexus) virtual switch designated for public traffic');
ALTER TABLE `cloud`.`account` ADD COLUMN `default_zone_id` bigint unsigned;
ALTER TABLE `cloud`.`account` ADD CONSTRAINT `fk_account__default_zone_id` FOREIGN KEY `fk_account__default_zone_id`(`default_zone_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE;
DROP TABLE IF EXISTS `cloud`.`cluster_vsm_map`;
DROP TABLE IF EXISTS `cloud`.`virtual_supervisor_module`;
DROP TABLE IF EXISTS `cloud`.`port_profile`;
CREATE TABLE `cloud`.`cluster_vsm_map` (
`cluster_id` bigint unsigned NOT NULL,
`vsm_id` bigint unsigned NOT NULL,
PRIMARY KEY (`cluster_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`virtual_supervisor_module` (
`id` bigint unsigned NOT NULL auto_increment COMMENT 'id',
`uuid` varchar(40),
`host_id` bigint NOT NULL,
`vsm_name` varchar(255),
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`ipaddr` varchar(80) NOT NULL,
`vcenteripaddr` varchar(80) NOT NULL,
`vcenterdcname` varchar(255) NOT NULL,
`management_vlan` int(32),
`control_vlan` int(32),
`packet_vlan` int(32),
`storage_vlan` int(32),
`vsmDomainId` bigint unsigned,
`config_mode` varchar(20),
`ConfigState` varchar(20),
`vsmDeviceState` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cloud`.`port_profile` (
`id` bigint unsigned NOT NULL auto_increment COMMENT 'id',
`uuid` varchar(40),
`port_profile_name` varchar(255),
`port_mode` varchar(10),
`vsm_id` bigint unsigned NOT NULL,
`trunk_low_vlan_id` int,
`trunk_high_vlan_id` int,
`access_vlan_id` int,
`port_type` varchar(20) NOT NULL,
`port_binding` varchar(20),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;