You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2012/05/28 00:30:43 UTC

[22/50] git commit: Bug CS-15020: DB inconsistencies after upgrade from Acton to Bonita

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.

Conflicts:

	setup/db/db/schema-302to303.sql


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/a31aa294
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/a31aa294
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/a31aa294

Branch: refs/heads/master
Commit: a31aa29423f29dd33c8545f1ca13fd0a50ce9300
Parents: e952f0d
Author: Vijayendra Bhamidipati <vi...@citrix.com>
Authored: Mon May 21 12:23:49 2012 -0700
Committer: Vijayendra Bhamidipati <vi...@citrix.com>
Committed: Fri May 25 18:22:41 2012 -0700

----------------------------------------------------------------------
 setup/db/db/schema-302to303.sql |   46 ++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a31aa294/setup/db/db/schema-302to303.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-302to303.sql b/setup/db/db/schema-302to303.sql
index dc0fd8f..5a4bbc6 100755
--- a/setup/db/db/schema-302to303.sql
+++ b/setup/db/db/schema-302to303.sql
@@ -127,4 +127,50 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'manag
 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;
 
+
 DELETE FROM `cloud`.`storage_pool_host_ref` WHERE pool_id IN (SELECT id FROM storage_pool WHERE removed IS NOT NULL);
+
+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;