You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/12/08 10:18:23 UTC
[2/2] git commit: updated refs/heads/master to eb66645
CLOUDSTACK-6212: auto_increment for some other resource tables
This fix alters table columns which are primary keys but don't have them
auto_increment such as region, domain_router, user_vm etc.
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
(cherry picked from commit a11ddf307747ef03785c27519fb535a36d4be145)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/eb666453
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/eb666453
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/eb666453
Branch: refs/heads/master
Commit: eb666453f3bd4f9ff06d12fad94bf7a2ca427099
Parents: a60d232
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Sat Dec 6 06:26:31 2014 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Dec 8 14:48:04 2014 +0530
----------------------------------------------------------------------
setup/db/db/schema-442to450.sql | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb666453/setup/db/db/schema-442to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-442to450.sql b/setup/db/db/schema-442to450.sql
index 72979c8..3131842 100644
--- a/setup/db/db/schema-442to450.sql
+++ b/setup/db/db/schema-442to450.sql
@@ -35,7 +35,15 @@ CREATE VIEW `cloud`.`storage_tag_view` AS
ALTER TABLE `cloud`.`volumes` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
-ALTER TABLE `cloud`.`vm_instance` MODIFY id bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
+
+-- Have primary keys of following table AUTO_INCREMENT
+ALTER TABLE `cloud`.`region` MODIFY `id` int unsigned AUTO_INCREMENT UNIQUE NOT NULL;
+ALTER TABLE `cloud`.`vm_instance` MODIFY `id` bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
+ALTER TABLE `cloud`.`user_vm` MODIFY `id` bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
+ALTER TABLE `cloud`.`domain_router` MODIFY `id` bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL;
+ALTER TABLE `cloud`.`service_offering` MODIFY `id` bigint unsigned AUTO_INCREMENT NOT NULL;
+ALTER TABLE `cloud`.`load_balancing_rules` MODIFY `id` bigint unsigned AUTO_INCREMENT NOT NULL;
+ALTER TABLE `cloud`.`port_forwarding_rules` MODIFY `id` bigint unsigned AUTO_INCREMENT NOT NULL;
DROP VIEW IF EXISTS `cloud`.`disk_offering_view`;
CREATE VIEW `cloud`.`disk_offering_view` AS