Allon Mureinik has uploaded a new change for review.

Change subject: core: Remove ImageStatus.INVALID
......................................................................

core: Remove ImageStatus.INVALID

The INVALID ImageStatus is not used anywhere in the codebase, and thus
can be removed.

Just to be on the safe side, this patch also includes an upgrade script
to convert any pre-existing INVALID images in the database to ILLEGAL
ones.

Change-Id: I256b289ab0afad1adb97d6518c6e764f76bac25b
Signed-off-by: Allon Mureinik <amure...@redhat.com>
---
A 
backend/manager/dbscripts/upgrade/03_03_0060_update_imagestatus_invalid_to_illegal.sql
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageStatus.java
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/94/14194/1

diff --git 
a/backend/manager/dbscripts/upgrade/03_03_0060_update_imagestatus_invalid_to_illegal.sql
 
b/backend/manager/dbscripts/upgrade/03_03_0060_update_imagestatus_invalid_to_illegal.sql
new file mode 100644
index 0000000..551d8a0
--- /dev/null
+++ 
b/backend/manager/dbscripts/upgrade/03_03_0060_update_imagestatus_invalid_to_illegal.sql
@@ -0,0 +1,2 @@
+-- Replace all INVALID statuses with ILLEGAL ones
+UPDATE images SET imagestatus = 4 WHERE imagestatus = 3;
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageStatus.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageStatus.java
index bc5c454..c61f33f 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageStatus.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ImageStatus.java
@@ -7,7 +7,6 @@
     Unassigned(0),
     OK(1),
     LOCKED(2),
-    INVALID(3),
     ILLEGAL(4);
 
     private int intValue;


--
To view, visit http://gerrit.ovirt.org/14194
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I256b289ab0afad1adb97d6518c6e764f76bac25b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amure...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to