Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 50121F192 for ; Fri, 29 Mar 2013 18:20:25 +0000 (UTC) Received: (qmail 4923 invoked by uid 500); 29 Mar 2013 18:20:19 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 4863 invoked by uid 500); 29 Mar 2013 18:20:19 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 3790 invoked by uid 99); 29 Mar 2013 18:20:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Mar 2013 18:20:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 5254C834106; Fri, 29 Mar 2013 18:20:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: prachidamle@apache.org To: commits@cloudstack.apache.org Date: Fri, 29 Mar 2013 18:20:59 -0000 Message-Id: <64268d02b442445c8416417b5e90734f@git.apache.org> In-Reply-To: <249912a2528342cc981002e54fe8ed15@git.apache.org> References: <249912a2528342cc981002e54fe8ed15@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [43/50] [abbrv] git commit: updated refs/heads/affinity_groups to 857ed16 Schema changes to create affinity group tables Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a0fbc213 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a0fbc213 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a0fbc213 Branch: refs/heads/affinity_groups Commit: a0fbc2137316830d932835e1dced47a04c8dcdcd Parents: e09d3a4 Author: Prachi Damle Authored: Thu Mar 14 17:32:33 2013 -0700 Committer: Prachi Damle Committed: Fri Mar 29 10:17:08 2013 -0700 ---------------------------------------------------------------------- setup/db/db/schema-410to420.sql | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a0fbc213/setup/db/db/schema-410to420.sql ---------------------------------------------------------------------- diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql index f1e24fa..454a617 100644 --- a/setup/db/db/schema-410to420.sql +++ b/setup/db/db/schema-410to420.sql @@ -133,6 +133,29 @@ 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;