cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: refs/heads/affinity_groups - Schema changes to create affinity group tables
Date Fri, 15 Mar 2013 00:32:46 GMT
Updated Branches:
  refs/heads/affinity_groups bbdfe0239 -> 0d7b10124


Schema changes to create affinity group tables


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

Branch: refs/heads/affinity_groups
Commit: 0d7b101246eefa70a15b9e0db81d7ae170a173cc
Parents: bbdfe02
Author: Prachi Damle <prachi@cloud.com>
Authored: Thu Mar 14 17:32:33 2013 -0700
Committer: Prachi Damle <prachi@cloud.com>
Committed: Thu Mar 14 17:32:33 2013 -0700

----------------------------------------------------------------------
 setup/db/db/schema-410to420.sql |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0d7b1012/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 4349bd0..008112b 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -110,5 +110,28 @@ CREATE TABLE `cloud`.`user_vm_clone_setting` (
 
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'UserVmManager',
'vmware.create.full.clone' , 'false', 'If set to true, creates VMs as full clones on ESX hypervisor');
 
+CREATE TABLE `cloud`.`affinity_group` (
+  `id` bigint unsigned NOT NULL auto_increment,
+  `name` varchar(255) NOT NULL,
+  `type` varchar(255) NOT NULL,
+  `uuid` varchar(40),
+  `description` varchar(4096) NULL,
+  `domain_id` bigint unsigned NOT NULL,
+  `account_id` bigint unsigned NOT NULL,
+  UNIQUE (`name`, `account_id`),
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `fk_affinity_group__account_id` FOREIGN KEY(`account_id`) REFERENCES `account`(`id`),
+  CONSTRAINT `fk_affinity_group__domain_id` FOREIGN KEY(`domain_id`) REFERENCES `domain`(`id`),
+  CONSTRAINT `uc_affinity_group__uuid` UNIQUE (`uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`affinity_group_vm_map` (
+  `id` bigint unsigned NOT NULL auto_increment,
+  `affinity_group_id` bigint unsigned NOT NULL,
+  `instance_id` bigint unsigned NOT NULL,
+  PRIMARY KEY  (`id`),
+  CONSTRAINT `fk_agvm__group_id` FOREIGN KEY(`affinity_group_id`) REFERENCES `affinity_group`(`id`)
 
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
 -- Re-enable foreign key checking, at the end of the upgrade path
 SET foreign_key_checks = 1;


Mime
View raw message