Add Liquibase to ACM runtime (Liquibase #3) 98/141498/5 master
authordanielhanrahan <daniel.hanrahan@est.tech>
Tue, 15 Jul 2025 09:31:14 +0000 (10:31 +0100)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Tue, 15 Jul 2025 12:59:16 +0000 (13:59 +0100)
This is the minimal work to get Liquibase running in ACM runtime:

- Add Liquibase POM dependency.
- Add Liquibase changelogs running all SQL files.
- Pre-conditions are added for each set of changes, to allow upgrade
  from existing database created by DB-migrator to Liquibase.
- Minor changes for some SQL files to be compatible with H2 database,
  used in tests (otherwise maven build would fail).
- Disable hibernate ddl-auto so only Liquibase runs during tests.

Issue-ID: POLICY-5398
Change-Id: Iaa1a589ee6e29516f10a2488f6577bbfa291e8ef
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
23 files changed:
packages/policy-clamp-tarball/src/main/resources/etc/AcRuntimeParameters.yaml
runtime-acm/pom.xml
runtime-acm/src/main/resources/application.yaml
runtime-acm/src/main/resources/db/changelog/1500/upgrade/0100-automationcomposition.sql
runtime-acm/src/main/resources/db/changelog/1600/upgrade/0200-automationcompositionelement.sql
runtime-acm/src/main/resources/db/changelog/1700/upgrade/0100-message.sql
runtime-acm/src/main/resources/db/changelog/1700/upgrade/0200-messagejob.sql
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0100-automationcompositionrollback.sql
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0200-automationcomposition.sql
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0300-automationcompositionelement.sql
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0500-automationcompositiondefinition.sql
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0600-nodetemplatestate.sql
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0800-participantreplica.sql
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0900-participantsupportedacelements.sql
runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml [new file with mode: 0644]
runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml [new file with mode: 0644]
runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml [new file with mode: 0644]
runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml [new file with mode: 0644]
runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml [new file with mode: 0644]
runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml [new file with mode: 0644]
runtime-acm/src/main/resources/db/changelog/db.changelog-master.yaml [new file with mode: 0644]
runtime-acm/src/test/resources/application-prometheus-noauth.yaml
runtime-acm/src/test/resources/application-tracing.yaml

index e8c3425..0c6d942 100644 (file)
@@ -18,7 +18,7 @@ spring:
       maximumPoolSize: 10
   jpa:
     hibernate:
-      ddl-auto: update
+      ddl-auto: none
       naming:
         physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
         implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
index f1304db..a3faee7 100644 (file)
             <artifactId>kafka-clients</artifactId>
             <scope>runtime</scope>
         </dependency>
+        <dependency>
+            <groupId>org.liquibase</groupId>
+            <artifactId>liquibase-core</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>
index 349f3f3..1edf36e 100644 (file)
@@ -20,7 +20,7 @@ spring:
       maximumPoolSize: 10
   jpa:
     hibernate:
-      ddl-auto: update
+      ddl-auto: none
       naming:
         physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
         implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
index 510a7d3..5b251f6 100644 (file)
@@ -17,5 +17,6 @@
  *  ============LICENSE_END=========================================================
  */
 
-ALTER TABLE automationcomposition ADD lastMsg timestamp without time zone DEFAULT Now(), ADD phase SMALLINT DEFAULT 0;
+ALTER TABLE automationcomposition ADD lastMsg timestamp without time zone DEFAULT Now();
+ALTER TABLE automationcomposition ADD phase SMALLINT DEFAULT 0;
 UPDATE automationcomposition SET restarting = NULL;
index f60aae8..af5f7ce 100644 (file)
@@ -17,4 +17,5 @@
  *  ============LICENSE_END=========================================================
  */
 
-ALTER TABLE automationcompositionelement ADD subState SMALLINT DEFAULT NULL, ADD stage SMALLINT DEFAULT NULL;
+ALTER TABLE automationcompositionelement ADD subState SMALLINT DEFAULT NULL;
+ALTER TABLE automationcompositionelement ADD stage SMALLINT DEFAULT NULL;
index d44d6bc..1b81716 100644 (file)
@@ -17,7 +17,7 @@
  *  ============LICENSE_END=========================================================
  */
 
-CREATE TABLE IF NOT EXISTS message (
+CREATE TABLE message (
   messageId varchar(255) NOT NULL,
   identificationId varchar(255) NOT NULL,
   lastMsg timestamp without time zone NOT NULL DEFAULT now(),
index c5dbb2e..2155dd2 100644 (file)
@@ -17,7 +17,7 @@
  *  ============LICENSE_END=========================================================
  */
 
-CREATE TABLE IF NOT EXISTS messagejob (
+CREATE TABLE messagejob (
   jobId varchar(255) NOT NULL,
   identificationId varchar(255) NOT NULL,
   jobStarted timestamp without time zone NOT NULL DEFAULT now(),
index d346c43..1749351 100644 (file)
@@ -22,4 +22,4 @@ CREATE TABLE automationcompositionrollback (
   compositionId VARCHAR(255) NOT NULL,\r
   elements TEXT NOT NULL,\r
   CONSTRAINT PK_AUTOMATIONCOMPOSITION_ROLLBACK PRIMARY KEY (instanceId)\r
-) WITHOUT OIDS;\r
+);\r
index 09a9d92..31f2d16 100644 (file)
@@ -24,16 +24,15 @@ UPDATE automationcomposition SET version = '1.0.0' WHERE version IS NULL;
 UPDATE automationcomposition SET lastMsg = now() WHERE lastMsg IS NULL;
 UPDATE automationcomposition SET subState = 0 WHERE subState IS NULL;
 
-ALTER TABLE automationcomposition
- ALTER COLUMN compositionid SET NOT NULL,
- ALTER COLUMN name SET DEFAULT '',
- ALTER COLUMN name SET NOT NULL,
- ALTER COLUMN version SET DEFAULT '1.0.0',
- ALTER COLUMN version SET NOT NULL,
- ALTER COLUMN deployState SET DEFAULT 2,
- ALTER COLUMN deployState SET NOT NULL,
- ALTER COLUMN lockState SET DEFAULT 4,
- ALTER COLUMN lockState SET NOT NULL,
- ALTER COLUMN SubState SET DEFAULT 0,
- ALTER COLUMN SubState SET NOT NULL,
- ALTER COLUMN lastMsg SET NOT NULL;
+ALTER TABLE automationcomposition ALTER COLUMN compositionid SET NOT NULL;
+ALTER TABLE automationcomposition ALTER COLUMN name SET DEFAULT '';
+ALTER TABLE automationcomposition ALTER COLUMN name SET NOT NULL;
+ALTER TABLE automationcomposition ALTER COLUMN version SET DEFAULT '1.0.0';
+ALTER TABLE automationcomposition ALTER COLUMN version SET NOT NULL;
+ALTER TABLE automationcomposition ALTER COLUMN deployState SET DEFAULT 2;
+ALTER TABLE automationcomposition ALTER COLUMN deployState SET NOT NULL;
+ALTER TABLE automationcomposition ALTER COLUMN lockState SET DEFAULT 4;
+ALTER TABLE automationcomposition ALTER COLUMN lockState SET NOT NULL;
+ALTER TABLE automationcomposition ALTER COLUMN SubState SET DEFAULT 0;
+ALTER TABLE automationcomposition ALTER COLUMN SubState SET NOT NULL;
+ALTER TABLE automationcomposition ALTER COLUMN lastMsg SET NOT NULL;
index 8e0811a..cf2b7cb 100644 (file)
@@ -23,18 +23,17 @@ UPDATE automationcompositionelement SET deploystate = 2 WHERE deploystate IS NUL
 UPDATE automationcompositionelement SET lockState = 4 WHERE lockState IS NULL;
 UPDATE automationcompositionelement SET subState = 0 WHERE subState IS NULL;
 
-ALTER TABLE automationcompositionelement
- ALTER COLUMN definition_name SET NOT NULL,
- ALTER COLUMN definition_name SET DEFAULT '',
- ALTER COLUMN definition_version SET NOT NULL,
- ALTER COLUMN definition_version SET DEFAULT '0.0.0',
- ALTER COLUMN deploystate SET NOT NULL,
- ALTER COLUMN deployState SET DEFAULT 2,
- ALTER COLUMN lockState SET NOT NULL,
- ALTER COLUMN lockState SET DEFAULT 4,
- ALTER COLUMN substate SET NOT NULL,
- ALTER COLUMN substate SET DEFAULT 0,
- ALTER COLUMN outproperties SET NOT NULL,
- ALTER COLUMN outproperties SET DEFAULT '{}',
- ALTER COLUMN properties SET NOT NULL,
- ALTER COLUMN properties SET DEFAULT '{}';
+ALTER TABLE automationcompositionelement ALTER COLUMN definition_name SET NOT NULL;
+ALTER TABLE automationcompositionelement ALTER COLUMN definition_name SET DEFAULT '';
+ALTER TABLE automationcompositionelement ALTER COLUMN definition_version SET NOT NULL;
+ALTER TABLE automationcompositionelement ALTER COLUMN definition_version SET DEFAULT '0.0.0';
+ALTER TABLE automationcompositionelement ALTER COLUMN deploystate SET NOT NULL;
+ALTER TABLE automationcompositionelement ALTER COLUMN deployState SET DEFAULT 2;
+ALTER TABLE automationcompositionelement ALTER COLUMN lockState SET NOT NULL;
+ALTER TABLE automationcompositionelement ALTER COLUMN lockState SET DEFAULT 4;
+ALTER TABLE automationcompositionelement ALTER COLUMN substate SET NOT NULL;
+ALTER TABLE automationcompositionelement ALTER COLUMN substate SET DEFAULT 0;
+ALTER TABLE automationcompositionelement ALTER COLUMN outproperties SET NOT NULL;
+ALTER TABLE automationcompositionelement ALTER COLUMN outproperties SET DEFAULT '{}';
+ALTER TABLE automationcompositionelement ALTER COLUMN properties SET NOT NULL;
+ALTER TABLE automationcompositionelement ALTER COLUMN properties SET DEFAULT '{}';
index 00c73cb..7f5a03c 100644 (file)
@@ -23,13 +23,12 @@ UPDATE automationcompositiondefinition SET state  = 0 WHERE state IS NULL;
 UPDATE automationcompositiondefinition SET lastMsg = now() WHERE lastMsg IS NULL;
 UPDATE automationcompositiondefinition SET serviceTemplate = '' WHERE serviceTemplate IS NULL;
 
-ALTER TABLE automationcompositiondefinition
- ALTER COLUMN name SET NOT NULL,
- ALTER COLUMN name SET DEFAULT '',
- ALTER COLUMN version SET NOT NULL,
- ALTER COLUMN version SET DEFAULT '1.0.0',
- ALTER COLUMN state SET NOT NULL,
- ALTER COLUMN state SET DEFAULT 0,
- ALTER COLUMN serviceTemplate SET NOT NULL,
- ALTER COLUMN serviceTemplate SET DEFAULT '',
- ALTER COLUMN lastMsg SET NOT NULL;
+ALTER TABLE automationcompositiondefinition ALTER COLUMN name SET NOT NULL;
+ALTER TABLE automationcompositiondefinition ALTER COLUMN name SET DEFAULT '';
+ALTER TABLE automationcompositiondefinition ALTER COLUMN version SET NOT NULL;
+ALTER TABLE automationcompositiondefinition ALTER COLUMN version SET DEFAULT '1.0.0';
+ALTER TABLE automationcompositiondefinition ALTER COLUMN state SET NOT NULL;
+ALTER TABLE automationcompositiondefinition ALTER COLUMN state SET DEFAULT 0;
+ALTER TABLE automationcompositiondefinition ALTER COLUMN serviceTemplate SET NOT NULL;
+ALTER TABLE automationcompositiondefinition ALTER COLUMN serviceTemplate SET DEFAULT '';
+ALTER TABLE automationcompositiondefinition ALTER COLUMN lastMsg SET NOT NULL;
index 6939f1c..03bb998 100644 (file)
@@ -22,12 +22,11 @@ UPDATE nodetemplatestate SET nodeTemplate_version = '1.0.0' WHERE nodeTemplate_v
 UPDATE nodetemplatestate SET outProperties = '{}' WHERE outProperties IS NULL;
 UPDATE nodetemplatestate SET state = 0 WHERE state IS NULL;
 
-ALTER TABLE nodetemplatestate
- ALTER COLUMN nodeTemplate_name SET NOT NULL,
- ALTER COLUMN nodeTemplate_name SET DEFAULT '',
- ALTER COLUMN nodeTemplate_version SET NOT NULL,
- ALTER COLUMN nodeTemplate_version SET DEFAULT '1.0.0',
- ALTER COLUMN outProperties SET NOT NULL,
- ALTER COLUMN outProperties SET DEFAULT '{}',
- ALTER COLUMN state SET NOT NULL,
- ALTER COLUMN state SET DEFAULT 0;
+ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_name SET NOT NULL;
+ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_name SET DEFAULT '';
+ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_version SET NOT NULL;
+ALTER TABLE nodetemplatestate ALTER COLUMN nodeTemplate_version SET DEFAULT '1.0.0';
+ALTER TABLE nodetemplatestate ALTER COLUMN outProperties SET NOT NULL;
+ALTER TABLE nodetemplatestate ALTER COLUMN outProperties SET DEFAULT '{}';
+ALTER TABLE nodetemplatestate ALTER COLUMN state SET NOT NULL;
+ALTER TABLE nodetemplatestate ALTER COLUMN state SET DEFAULT 0;
index 7660b6f..8790500 100644 (file)
@@ -20,9 +20,8 @@
 UPDATE participantreplica SET lastMsg = now() WHERE lastMsg IS NULL;
 UPDATE participantreplica SET participantState = '1' WHERE participantState IS NULL;
 
-ALTER TABLE participantreplica
- ALTER COLUMN lastMsg SET NOT NULL,
- ALTER COLUMN participantId SET NOT NULL,
- ALTER COLUMN participantId SET DEFAULT '',
- ALTER COLUMN participantState SET NOT NULL,
- ALTER COLUMN participantState SET DEFAULT 1;
+ALTER TABLE participantreplica ALTER COLUMN lastMsg SET NOT NULL;
+ALTER TABLE participantreplica ALTER COLUMN participantId SET NOT NULL;
+ALTER TABLE participantreplica ALTER COLUMN participantId SET DEFAULT '';
+ALTER TABLE participantreplica ALTER COLUMN participantState SET NOT NULL;
+ALTER TABLE participantreplica ALTER COLUMN participantState SET DEFAULT 1;
index 8b7a42c..8ded46a 100644 (file)
 UPDATE participantsupportedacelements SET typeName = '' WHERE typeName IS NULL;
 UPDATE participantsupportedacelements SET typeVersion = '1.0.0' WHERE typeVersion IS NULL;
 
-ALTER TABLE participantsupportedacelements
- ALTER COLUMN participantId SET NOT NULL,
- ALTER COLUMN participantId SET DEFAULT '',
- ALTER COLUMN typeName SET NOT NULL,
- ALTER COLUMN typeName SET DEFAULT '',
- ALTER COLUMN typeVersion SET NOT NULL,
- ALTER COLUMN typeVersion SET DEFAULT '1.0.0';
+ALTER TABLE participantsupportedacelements ALTER COLUMN participantId SET NOT NULL;
+ALTER TABLE participantsupportedacelements ALTER COLUMN participantId SET DEFAULT '';
+ALTER TABLE participantsupportedacelements ALTER COLUMN typeName SET NOT NULL;
+ALTER TABLE participantsupportedacelements ALTER COLUMN typeName SET DEFAULT '';
+ALTER TABLE participantsupportedacelements ALTER COLUMN typeVersion SET NOT NULL;
+ALTER TABLE participantsupportedacelements ALTER COLUMN typeVersion SET DEFAULT '1.0.0';
diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml
new file mode 100644 (file)
index 0000000..fb767de
--- /dev/null
@@ -0,0 +1,54 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 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.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+databaseChangeLog:
+  - changeSet:
+      author: policy
+      id: 1400
+      preConditions:
+        not:
+          tableExists:
+            tableName: automationcomposition
+        onFail: MARK_RAN
+      changes:
+        - sqlFile:
+            path: db/changelog/1400/upgrade/0100-automationcomposition.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/0200-automationcompositiondefinition.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/0300-automationcompositionelement.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/0400-nodetemplatestate.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/0500-participant.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/0600-participantsupportedelements.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/0700-ac_compositionId_index.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/0800-ac_element_fk_index.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/0900-dt_element_fk_index.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/1000-supported_element_fk_index.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/1100-automationcompositionelement_fk.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/1200-nodetemplate_fk.sql
+        - sqlFile:
+            path: db/changelog/1400/upgrade/1300-participantsupportedelements_fk.sql
diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml
new file mode 100644 (file)
index 0000000..2aeed5c
--- /dev/null
@@ -0,0 +1,44 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 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.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+databaseChangeLog:
+  - changeSet:
+      author: policy
+      id: 1500
+      preConditions:
+        not:
+          tableExists:
+            tableName: participantreplica
+        onFail: MARK_RAN
+      changes:
+        - sqlFile:
+            path: db/changelog/1500/upgrade/0100-automationcomposition.sql
+        - sqlFile:
+            path: db/changelog/1500/upgrade/0200-automationcompositiondefinition.sql
+        - sqlFile:
+            path: db/changelog/1500/upgrade/0300-participantreplica.sql
+        - sqlFile:
+            path: db/changelog/1500/upgrade/0400-participant.sql
+        - sqlFile:
+            path: db/changelog/1500/upgrade/0500-participant_replica_fk_index.sql
+        - sqlFile:
+            path: db/changelog/1500/upgrade/0600-participant_replica_fk.sql
+        - sqlFile:
+            path: db/changelog/1500/upgrade/0700-automationcompositionelement.sql
+        - sqlFile:
+            path: db/changelog/1500/upgrade/0800-nodetemplatestate.sql
diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml
new file mode 100644 (file)
index 0000000..1cbfddb
--- /dev/null
@@ -0,0 +1,33 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 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.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+databaseChangeLog:
+  - changeSet:
+      author: policy
+      id: 1600
+      preConditions:
+        not:
+          columnExists:
+            tableName: automationcomposition
+            columnName: subState
+        onFail: MARK_RAN
+      changes:
+        - sqlFile:
+            path: db/changelog/1600/upgrade/0100-automationcomposition.sql
+        - sqlFile:
+            path: db/changelog/1600/upgrade/0200-automationcompositionelement.sql
diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml
new file mode 100644 (file)
index 0000000..bf21bee
--- /dev/null
@@ -0,0 +1,27 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 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.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+databaseChangeLog:
+  - changeSet:
+      author: policy
+      id: 1601
+      changes:
+        - sqlFile:
+            path: db/changelog/1601/upgrade/0100-automationcomposition.sql
+        - sqlFile:
+            path: db/changelog/1601/upgrade/0200-automationcompositionelement.sql
diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml
new file mode 100644 (file)
index 0000000..26a4973
--- /dev/null
@@ -0,0 +1,34 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 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.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+databaseChangeLog:
+  - changeSet:
+      author: policy
+      id: 1700
+      preConditions:
+        not:
+          tableExists:
+            tableName: message
+        onFail: MARK_RAN
+      changes:
+        - sqlFile:
+            path: db/changelog/1700/upgrade/0100-message.sql
+        - sqlFile:
+            path: db/changelog/1700/upgrade/0200-messagejob.sql
+        - sqlFile:
+            path: db/changelog/1700/upgrade/0300-messagejob_identificationId_index.sql
diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml
new file mode 100644 (file)
index 0000000..dfc4b26
--- /dev/null
@@ -0,0 +1,46 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 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.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+databaseChangeLog:
+  - changeSet:
+      author: policy
+      id: 1701
+      preConditions:
+        not:
+          tableExists:
+            tableName: automationcompositionrollback
+        onFail: MARK_RAN
+      changes:
+        - sqlFile:
+            path: db/changelog/1701/upgrade/0100-automationcompositionrollback.sql
+        - sqlFile:
+            path: db/changelog/1701/upgrade/0200-automationcomposition.sql
+        - sqlFile:
+            path: db/changelog/1701/upgrade/0300-automationcompositionelement.sql
+        - sqlFile:
+            path: db/changelog/1701/upgrade/0400-automationcomposition_fk.sql
+        - sqlFile:
+            path: db/changelog/1701/upgrade/0500-automationcompositiondefinition.sql
+        - sqlFile:
+            path: db/changelog/1701/upgrade/0600-nodetemplatestate.sql
+        - sqlFile:
+            path: db/changelog/1701/upgrade/0700-mb_identificationId_index.sql
+        - sqlFile:
+            path: db/changelog/1701/upgrade/0800-participantreplica.sql
+        - sqlFile:
+            path: db/changelog/1701/upgrade/0900-participantsupportedacelements.sql
diff --git a/runtime-acm/src/main/resources/db/changelog/db.changelog-master.yaml b/runtime-acm/src/main/resources/db/changelog/db.changelog-master.yaml
new file mode 100644 (file)
index 0000000..d50d972
--- /dev/null
@@ -0,0 +1,31 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025 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.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+databaseChangeLog:
+  - include:
+      file: db/changelog/changelog-1400.yaml
+  - include:
+      file: db/changelog/changelog-1500.yaml
+  - include:
+      file: db/changelog/changelog-1600.yaml
+  - include:
+      file: db/changelog/changelog-1601.yaml
+  - include:
+      file: db/changelog/changelog-1700.yaml
+  - include:
+      file: db/changelog/changelog-1701.yaml
index a75c5d3..9815fe3 100644 (file)
@@ -7,7 +7,7 @@ spring:
       maximumPoolSize: 3
   jpa:
     hibernate:
-      ddl-auto: create
+      ddl-auto: none
     open-in-view: false
 
 tracing:
@@ -19,4 +19,4 @@ tracing:
     jaeger-remote:
       endpoint: http://jaeger:14250
 
-basicAuth: false
\ No newline at end of file
+basicAuth: false
index d24fe9c..590974c 100644 (file)
@@ -7,7 +7,7 @@ spring:
       maximumPoolSize: 3
   jpa:
     hibernate:
-      ddl-auto: create-drop
+      ddl-auto: none
     open-in-view: false
 
 management:
@@ -24,4 +24,4 @@ tracing:
     protocol: grpc
   sampler:
     jaeger-remote:
-      endpoint: http://jaeger:14250
\ No newline at end of file
+      endpoint: http://jaeger:14250