cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 7ac795f
Date Thu, 06 Aug 2015 11:49:20 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 18fee9510 -> 7ac795f82


CLOUDSTACK-8696: Create Region fails with exception

'id' in the region table should not be an autoincrement unlike other
tables. This is because, region ids must be in sync across installs and
hence is accepted as input to the addRegions api.

It is not a good practise to override id for this purpose. another
column 'regionId' has to be created and used(CLOUDSTACK-8706). until it
is fixed, id should never be autoincrement in regions table.


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

Branch: refs/heads/master
Commit: b6a78044a0881e17d045f35850222c275a84642e
Parents: c1ac5f3
Author: Rajani Karuturi <rajanikaruturi@gmail.com>
Authored: Tue Aug 4 14:49:30 2015 +0530
Committer: Rajani Karuturi <rajanikaruturi@gmail.com>
Committed: Tue Aug 4 15:09:16 2015 +0530

----------------------------------------------------------------------
 setup/db/db/schema-452to460.sql | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b6a78044/setup/db/db/schema-452to460.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-452to460.sql b/setup/db/db/schema-452to460.sql
index 0abd4f8..9009ba4 100644
--- a/setup/db/db/schema-452to460.sql
+++ b/setup/db/db/schema-452to460.sql
@@ -398,3 +398,7 @@ CREATE TABLE `cloud`.`external_bigswitch_bcf_devices` (
   CONSTRAINT `fk_external_bigswitch_bcf_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES
`host`(`id`) ON DELETE CASCADE,
   CONSTRAINT `fk_external_bigswitch_bcf_devices__physical_network_id` FOREIGN KEY (`physical_network_id`)
REFERENCES `physical_network`(`id`) ON DELETE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+SET foreign_key_checks = 0;
+ALTER TABLE `cloud`.`region` MODIFY `id` int unsigned UNIQUE NOT NULL;
+SET foreign_key_checks = 1;


Mime
View raw message