From 2ff791b0b851baec0f66c8172b7d6083232984a4 Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Fri, 1 Nov 2013 21:38:50 -0700 Subject: [PATCH] CLOUDSTACK-5025: volumes.display_volume field should be set to 1 by default. DB used to handle this, but VO was missing the default field assignment. Fixed th e VO and db upgrade to update all existing volumes with 1 value --- engine/schema/src/com/cloud/storage/VolumeVO.java | 2 +- setup/db/db/schema-421to430.sql | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/schema/src/com/cloud/storage/VolumeVO.java b/engine/schema/src/com/cloud/storage/VolumeVO.java index df7cfd4a749..1bdd09f9ab6 100755 --- a/engine/schema/src/com/cloud/storage/VolumeVO.java +++ b/engine/schema/src/com/cloud/storage/VolumeVO.java @@ -146,7 +146,7 @@ public class VolumeVO implements Volume { private Storage.ImageFormat format; @Column(name = "display_volume", updatable = true, nullable = false) - protected boolean displayVolume; + protected boolean displayVolume = true; @Column(name = "iscsi_name") private String _iScsiName; diff --git a/setup/db/db/schema-421to430.sql b/setup/db/db/schema-421to430.sql index d3f7adf9e12..1c99e3f79d0 100644 --- a/setup/db/db/schema-421to430.sql +++ b/setup/db/db/schema-421to430.sql @@ -485,3 +485,5 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'manag 'Sets the object type of groups within LDAP','groupOfUniqueNames',NULL,NULL,0); INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'ldap.group.user.uniquemember', 'uniquemember', 'Sets the attribute for uniquemembers within a group','uniquemember',NULL,NULL,0); + +UPDATE `cloud`.`volumes` SET display_volume=1 where id>0;