Add missing preconditions in liqibase changelogs 79/142979/1
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>
Thu, 22 Jan 2026 13:42:50 +0000 (13:42 +0000)
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>
Thu, 22 Jan 2026 13:52:12 +0000 (13:52 +0000)
Issue-ID: POLICY-5536
Change-Id: I6941f42feea19c4175326400f3a2e9eb3efbe9e7
Signed-off-by: rameshiyer27 <ramesh.murugan.iyer@est.tech>
runtime-acm/src/main/resources/db/changelog/changelog-1800.yaml

index 99d534e..77eb8ba 100644 (file)
@@ -1,5 +1,5 @@
 # ============LICENSE_START=======================================================
-# Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
+# Copyright (C) 2025-2026 OpenInfra Foundation Europe. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -22,6 +22,11 @@ databaseChangeLog:
   - changeSet:
       author: policy
       id: 1800-1
+      preConditions:
+        - onFail: MARK_RAN
+        - columnExists:
+            tableName: AutomationCompositionElement
+            columnName: restarting
       changes:
         - dropColumn:
             tableName: AutomationCompositionElement
@@ -37,6 +42,11 @@ databaseChangeLog:
   - changeSet:
       author: policy
       id: 1800-2
+      preConditions:
+        - onFail: MARK_RAN
+        - columnExists:
+            tableName: NodeTemplateState
+            columnName: restarting
       changes:
         - dropColumn:
             tableName: NodeTemplateState
@@ -52,6 +62,12 @@ databaseChangeLog:
   - changeSet:
       author: policy
       id: 1800-3
+      preConditions:
+        - onFail: MARK_RAN
+        - not:
+            - columnExists:
+                tableName: AutomationCompositionElement
+                columnName: migrationState
       changes:
         - addColumn:
             tableName: AutomationCompositionElement