From 2455cf3aabbdbcfd1d299caad558dede96ac85fe Mon Sep 17 00:00:00 2001
From: lukegleeson <luke.gleeson@est.tech>
Date: Tue, 11 Oct 2022 17:32:38 +0100
Subject: Default CMHandles to READY during upgrade

Allows upgrade from liquibase changelog 11 to 16
Sets CMHandles which do not have a state to state READY

Issue-ID: CPS-1312
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: I6b6b05ba6fad3d174e43e9c385cbc1f9f4e4e5e5
(cherry picked from commit 8b37702647755949165dc822116ed10dca5c1c2f)
---
 .../changelog/db/changes/16-insert-cm-handle-state-rollback.sql   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-rollback.sql')

diff --git a/cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-rollback.sql b/cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-rollback.sql
index aaf05a24cb..4b006ef0e2 100644
--- a/cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-rollback.sql
+++ b/cps-ri/src/main/resources/changelog/db/changes/16-insert-cm-handle-state-rollback.sql
@@ -1,4 +1,4 @@
-delete from fragment where xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/lock-reason$';
-delete from fragment where xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/datastores/operational$';
-delete from fragment where xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/datastores$';
-delete from fragment where xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state$';
\ No newline at end of file
+DELETE FROM fragment WHERE xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/lock-reason$';
+DELETE FROM fragment WHERE xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/datastores/operational$';
+DELETE FROM fragment WHERE xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state/datastores$';
+DELETE FROM fragment WHERE xpath ~* '^/dmi-registry/cm-handles\[@id=''[\w\-]+''\]/state$';
\ No newline at end of file
-- 
cgit 1.2.3-korg

