incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [41/50] [abbrv] git commit: refs/heads/javelin - CLOUDSTACK-686: Modified unique constraint to include physical_network_id
Date Fri, 01 Feb 2013 19:38:11 GMT
CLOUDSTACK-686: Modified unique constraint to include physical_network_id


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

Branch: refs/heads/javelin
Commit: 33b87d898596098c70dfe0f017351aa1b904fefe
Parents: c0b18c7
Author: Kishan Kavala <kishan@cloud.com>
Authored: Fri Feb 1 07:54:02 2013 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Fri Feb 1 07:54:31 2013 +0530

----------------------------------------------------------------------
 setup/db/create-schema.sql     |    2 +-
 setup/db/db/schema-40to410.sql |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/33b87d89/setup/db/create-schema.sql
----------------------------------------------------------------------
diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql
index 4e41f49..7760f5d 100755
--- a/setup/db/create-schema.sql
+++ b/setup/db/create-schema.sql
@@ -670,7 +670,7 @@ CREATE TABLE `cloud`.`op_dc_vnet_alloc` (
     PRIMARY KEY (`id`),
     UNIQUE `i_op_dc_vnet_alloc__vnet__data_center_id__account_id`(`vnet`, `data_center_id`,
`account_id`),
     INDEX `i_op_dc_vnet_alloc__dc_taken`(`data_center_id`, `taken`),
-    UNIQUE `i_op_dc_vnet_alloc__vnet__data_center_id`(`vnet`, `data_center_id`),
+    UNIQUE `i_op_dc_vnet_alloc__vnet__data_center_id`(`vnet`, `physical_network_id`, `data_center_id`),
 	CONSTRAINT `fk_op_dc_vnet_alloc__data_center_id` FOREIGN KEY (`data_center_id`) REFERENCES
`data_center`(`id`) ON DELETE CASCADE,
 	CONSTRAINT `fk_op_dc_vnet_alloc__physical_network_id` FOREIGN KEY (`physical_network_id`)
REFERENCES `physical_network`(`id`) ON DELETE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/33b87d89/setup/db/db/schema-40to410.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-40to410.sql b/setup/db/db/schema-40to410.sql
index ed4946e..304e12c 100644
--- a/setup/db/db/schema-40to410.sql
+++ b/setup/db/db/schema-40to410.sql
@@ -1264,3 +1264,7 @@ CREATE VIEW `cloud`.`data_center_view` AS
         `cloud`.`domain` ON data_center.domain_id = domain.id;               
         
 INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server',
'direct.agent.pool.size', '500', 'Default size for DirectAgentPool');
+
+ALTER TABLE `cloud`.`op_dc_vnet_alloc` DROP INDEX i_op_dc_vnet_alloc__vnet__data_center_id;
+
+ALTER TABLE `cloud`.`op_dc_vnet_alloc` ADD CONSTRAINT UNIQUE `i_op_dc_vnet_alloc__vnet__data_center_id`(`vnet`,
`physical_network_id`, `data_center_id`);


Mime
View raw message