You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by yn...@apache.org on 2014/07/02 00:23:24 UTC

git commit: updated refs/heads/master to 890e71c

Repository: cloudstack
Updated Branches:
  refs/heads/master a08528cfd -> 890e71cb5


CLOUDSTACK-7032 bugfix: listVolumes throws an error

Since schema change made on 4.4 is not applied to the upgrade script
from 4.4 to 4.5, listVolumes api throws an error.
This commit fix the issue.


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

Branch: refs/heads/master
Commit: 890e71cb5c2f80b09cd4db7947d94e325d7bd182
Parents: a08528c
Author: ynojima <ma...@ynojima.net>
Authored: Tue Jul 1 13:55:41 2014 -0600
Committer: ynojima <ma...@ynojima.net>
Committed: Tue Jul 1 16:23:00 2014 -0600

----------------------------------------------------------------------
 setup/db/db/schema-440to450.sql | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/890e71cb/setup/db/db/schema-440to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-440to450.sql b/setup/db/db/schema-440to450.sql
index 77445a9..c88a18a 100644
--- a/setup/db/db/schema-440to450.sql
+++ b/setup/db/db/schema-440to450.sql
@@ -178,6 +178,12 @@ CREATE VIEW `cloud`.`volume_view` AS
         vm_template.uuid template_uuid,
         vm_template.extractable,
         vm_template.type template_type,
+        vm_template.name template_name,
+        vm_template.display_text template_display_text,
+        iso.id iso_id,
+        iso.uuid iso_uuid,
+        iso.name iso_name,
+        iso.display_text iso_display_text,
         resource_tags.id tag_id,
         resource_tags.uuid tag_uuid,
         resource_tags.key tag_key,
@@ -215,7 +221,9 @@ CREATE VIEW `cloud`.`volume_view` AS
             left join
         `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id
             left join
-        `cloud`.`vm_template` ON volumes.template_id = vm_template.id OR volumes.iso_id = vm_template.id
+        `cloud`.`vm_template` ON volumes.template_id = vm_template.id
+            left join
+        `cloud`.`vm_template` iso ON iso.id = volumes.iso_id
             left join
         `cloud`.`resource_tags` ON resource_tags.resource_id = volumes.id
             and resource_tags.resource_type = 'Volume'