Inline SQL files in Liquibase changelog (Liquibase #7) 87/141587/1
authordanielhanrahan <daniel.hanrahan@est.tech>
Thu, 17 Jul 2025 17:47:19 +0000 (18:47 +0100)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Thu, 24 Jul 2025 13:26:10 +0000 (14:26 +0100)
Move content of SQL files directly into Liquibase changelogs.
No changes are made to the SQL.

Issue-ID: POLICY-5398
Change-Id: I4bd91d7dfd2dd0ada82e17b4b92cf64175538f43
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
49 files changed:
runtime-acm/src/main/resources/db/changelog/1400/upgrade/0100-automationcomposition.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/0200-automationcompositiondefinition.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/0300-automationcompositionelement.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/0400-nodetemplatestate.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/0500-participant.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/0600-participantsupportedelements.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/0700-ac_compositionId_index.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/0800-ac_element_fk_index.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/0900-dt_element_fk_index.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/1000-supported_element_fk_index.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/1100-automationcompositionelement_fk.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/1200-nodetemplate_fk.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1400/upgrade/1300-participantsupportedelements_fk.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1500/upgrade/0100-automationcomposition.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1500/upgrade/0200-automationcompositiondefinition.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1500/upgrade/0300-participantreplica.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1500/upgrade/0400-participant.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1500/upgrade/0500-participant_replica_fk_index.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1500/upgrade/0600-participant_replica_fk.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1500/upgrade/0700-automationcompositionelement.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1500/upgrade/0800-nodetemplatestate.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1600/upgrade/0100-automationcomposition.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1600/upgrade/0200-automationcompositionelement.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1601/upgrade/0100-automationcomposition.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1601/upgrade/0200-automationcompositionelement.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1700/upgrade/0100-message.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1700/upgrade/0200-messagejob.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1700/upgrade/0300-messagejob_identificationId_index.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0100-automationcompositionrollback.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0200-automationcomposition.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0300-automationcompositionelement.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0400-automationcomposition_fk.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0500-automationcompositiondefinition.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0600-nodetemplatestate.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0700-mb_identificationId_index.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0800-participantreplica.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1701/upgrade/0900-participantsupportedacelements.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1702/upgrade/0100-automationcomposition.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1702/upgrade/0200-automationcompositiondefinition.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1702/upgrade/0300-automationcompositionelement.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1702/upgrade/0400-participant.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/1702/upgrade/0500-participantreplica.sql [deleted file]
runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml
runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml
runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml
runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml
runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml
runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml
runtime-acm/src/main/resources/db/changelog/changelog-1702.yaml

diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0100-automationcomposition.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0100-automationcomposition.sql
deleted file mode 100644 (file)
index 414247e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE TABLE automationcomposition (
-  instanceId VARCHAR(255) NOT NULL,
-  compositionId VARCHAR(255),
-  compositionTargetId VARCHAR(255),
-  deployState SMALLINT DEFAULT NULL,
-  description VARCHAR(255),
-  lockState SMALLINT DEFAULT NULL,
-  name VARCHAR(255),
-  restarting BOOLEAN,
-  stateChangeResult SMALLINT DEFAULT NULL,
-  version VARCHAR(255),
-  CONSTRAINT PK_AUTOMATIONCOMPOSITION PRIMARY KEY (instanceId)
-);
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0200-automationcompositiondefinition.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0200-automationcompositiondefinition.sql
deleted file mode 100644 (file)
index 7ae65f0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE TABLE automationcompositiondefinition (
-  compositionId VARCHAR(255) NOT NULL,
-  name VARCHAR(255),
-  restarting BOOLEAN,
-  serviceTemplate TEXT,
-  state SMALLINT DEFAULT NULL,
-  stateChangeResult SMALLINT DEFAULT NULL,
-  version VARCHAR(255),
-  CONSTRAINT PK_AUTOMATIONCOMPOSITIONDEFINITION PRIMARY KEY (compositionId)
-);
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0300-automationcompositionelement.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0300-automationcompositionelement.sql
deleted file mode 100644 (file)
index 41c4adc..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE TABLE automationcompositionelement (
-  elementId VARCHAR(255) NOT NULL,
-  definition_name VARCHAR(255),
-  definition_version VARCHAR(255),
-  deployState SMALLINT DEFAULT NULL,
-  description VARCHAR(255),
-  instanceId VARCHAR(255),
-  lockState SMALLINT DEFAULT NULL,
-  message VARCHAR(255),
-  operationalState VARCHAR(255),
-  outProperties TEXT,
-  participantId VARCHAR(255),
-  properties TEXT,
-  restarting BOOLEAN,
-  useState VARCHAR(255),
-  CONSTRAINT PK_AUTOMATIONCOMPOSITIONELEMENT PRIMARY KEY (elementId)
-);
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0400-nodetemplatestate.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0400-nodetemplatestate.sql
deleted file mode 100644 (file)
index 9af1632..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE TABLE nodetemplatestate (
-  nodeTemplateStateId VARCHAR(255) NOT NULL,
-  compositionId VARCHAR(255),
-  message VARCHAR(255),
-  nodeTemplate_name VARCHAR(255),
-  nodeTemplate_version VARCHAR(255),
-  outProperties TEXT,
-  participantId VARCHAR(255),
-  restarting BOOLEAN,
-  state SMALLINT DEFAULT NULL,
-  CONSTRAINT PK_NODETEMPLATESTATE PRIMARY KEY (nodeTemplateStateId)
-);
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0500-participant.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0500-participant.sql
deleted file mode 100644 (file)
index 5f98f57..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE TABLE participant (
-  participantId VARCHAR(255) NOT NULL,
-  description VARCHAR(255),
-  participantState SMALLINT DEFAULT NULL,
-  CONSTRAINT PK_PARTICIPANT PRIMARY KEY (participantId)
-);
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0600-participantsupportedelements.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0600-participantsupportedelements.sql
deleted file mode 100644 (file)
index c6ae4ce..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE TABLE participantsupportedacelements (
-  id VARCHAR(255) NOT NULL,
-  participantId VARCHAR(255),
-  typeName VARCHAR(255),
-  typeVersion VARCHAR(255),
-  CONSTRAINT PK_PARTICIPANTSUPPORTEDACELEMENTS PRIMARY KEY (id)
-);
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0700-ac_compositionId_index.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0700-ac_compositionId_index.sql
deleted file mode 100644 (file)
index 4eeb41d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE INDEX ac_compositionId ON automationcomposition(compositionId);
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0800-ac_element_fk_index.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0800-ac_element_fk_index.sql
deleted file mode 100644 (file)
index 316a393..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE INDEX ac_element_fk ON automationcompositionelement(instanceId);
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0900-dt_element_fk_index.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0900-dt_element_fk_index.sql
deleted file mode 100644 (file)
index cac3319..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE INDEX dt_element_fk ON nodetemplatestate(compositionId);
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1000-supported_element_fk_index.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1000-supported_element_fk_index.sql
deleted file mode 100644 (file)
index a1e66c5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE INDEX supported_element_fk ON participantsupportedacelements(participantId);
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1100-automationcompositionelement_fk.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1100-automationcompositionelement_fk.sql
deleted file mode 100644 (file)
index b67d208..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-ALTER TABLE automationcompositionelement
-  ADD CONSTRAINT ac_element_fk
-  FOREIGN KEY (instanceId)
-  REFERENCES automationcomposition (instanceId)
-  ON UPDATE RESTRICT
-  ON DELETE RESTRICT;
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1200-nodetemplate_fk.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1200-nodetemplate_fk.sql
deleted file mode 100644 (file)
index da9ee2f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-ALTER TABLE nodetemplatestate
-  ADD CONSTRAINT dt_element_fk
-  FOREIGN KEY (compositionId)
-  REFERENCES automationcompositiondefinition (compositionId)
-  ON UPDATE RESTRICT
-  ON DELETE RESTRICT;
diff --git a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1300-participantsupportedelements_fk.sql b/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1300-participantsupportedelements_fk.sql
deleted file mode 100644 (file)
index 8099b58..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-ALTER TABLE participantsupportedacelements
-  ADD CONSTRAINT supported_element_fk
-  FOREIGN KEY (participantId)
-  REFERENCES participant (participantId)
-  ON UPDATE RESTRICT
-  ON DELETE RESTRICT;
diff --git a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0100-automationcomposition.sql b/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0100-automationcomposition.sql
deleted file mode 100644 (file)
index 5b251f6..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-ALTER TABLE automationcomposition ADD lastMsg timestamp without time zone DEFAULT Now();
-ALTER TABLE automationcomposition ADD phase SMALLINT DEFAULT 0;
-UPDATE automationcomposition SET restarting = NULL;
diff --git a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0200-automationcompositiondefinition.sql b/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0200-automationcompositiondefinition.sql
deleted file mode 100644 (file)
index 5acec8c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-ALTER TABLE automationcompositiondefinition ADD lastMsg timestamp without time zone DEFAULT Now();
-UPDATE automationcompositiondefinition SET restarting = NULL;
diff --git a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0300-participantreplica.sql b/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0300-participantreplica.sql
deleted file mode 100644 (file)
index d624729..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE TABLE participantreplica (
-  replicaId varchar(255) NOT NULL,
-  lastMsg timestamp without time zone DEFAULT Now(),
-  participantId varchar(255) DEFAULT NULL,
-  participantState SMALLINT DEFAULT NULL,
-  CONSTRAINT PK_PARTICIPANT_REPLICA PRIMARY KEY (replicaId)
-);
-
diff --git a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0400-participant.sql b/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0400-participant.sql
deleted file mode 100644 (file)
index 214fa07..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-ALTER TABLE participant ADD lastMsg timestamp without time zone DEFAULT Now();
diff --git a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0500-participant_replica_fk_index.sql b/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0500-participant_replica_fk_index.sql
deleted file mode 100644 (file)
index 0715351..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-CREATE INDEX participant_replica_fk ON participantreplica(participantId);
diff --git a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0600-participant_replica_fk.sql b/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0600-participant_replica_fk.sql
deleted file mode 100644 (file)
index 2747119..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-ALTER TABLE participantreplica
-  ADD CONSTRAINT participant_replica_fk
-  FOREIGN KEY (participantId)
-  REFERENCES participant (participantId)
-  ON UPDATE RESTRICT
-  ON DELETE RESTRICT;
diff --git a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0700-automationcompositionelement.sql b/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0700-automationcompositionelement.sql
deleted file mode 100644 (file)
index 44090a2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-UPDATE automationcompositionelement SET restarting = NULL;
diff --git a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0800-nodetemplatestate.sql b/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0800-nodetemplatestate.sql
deleted file mode 100644 (file)
index 898a516..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-UPDATE nodetemplatestate SET restarting = NULL;
diff --git a/runtime-acm/src/main/resources/db/changelog/1600/upgrade/0100-automationcomposition.sql b/runtime-acm/src/main/resources/db/changelog/1600/upgrade/0100-automationcomposition.sql
deleted file mode 100644 (file)
index ea392a4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-ALTER TABLE automationcomposition ADD subState SMALLINT DEFAULT NULL;
diff --git a/runtime-acm/src/main/resources/db/changelog/1600/upgrade/0200-automationcompositionelement.sql b/runtime-acm/src/main/resources/db/changelog/1600/upgrade/0200-automationcompositionelement.sql
deleted file mode 100644 (file)
index af5f7ce..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2024-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=========================================================
- */
-
-ALTER TABLE automationcompositionelement ADD subState SMALLINT DEFAULT NULL;
-ALTER TABLE automationcompositionelement ADD stage SMALLINT DEFAULT NULL;
diff --git a/runtime-acm/src/main/resources/db/changelog/1601/upgrade/0100-automationcomposition.sql b/runtime-acm/src/main/resources/db/changelog/1601/upgrade/0100-automationcomposition.sql
deleted file mode 100644 (file)
index 6ff43b6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-UPDATE automationcomposition SET subState=0 WHERE subState is NULL;
diff --git a/runtime-acm/src/main/resources/db/changelog/1601/upgrade/0200-automationcompositionelement.sql b/runtime-acm/src/main/resources/db/changelog/1601/upgrade/0200-automationcompositionelement.sql
deleted file mode 100644 (file)
index 25c9849..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-UPDATE automationcompositionelement SET subState=0 WHERE subState is NULL;
-UPDATE automationcompositionelement SET stage=0 WHERE stage is NULL;
diff --git a/runtime-acm/src/main/resources/db/changelog/1700/upgrade/0100-message.sql b/runtime-acm/src/main/resources/db/changelog/1700/upgrade/0100-message.sql
deleted file mode 100644 (file)
index 1b81716..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-CREATE TABLE message (
-  messageId varchar(255) NOT NULL,
-  identificationId varchar(255) NOT NULL,
-  lastMsg timestamp without time zone NOT NULL DEFAULT now(),
-  docMessage text NOT NULL,
-  CONSTRAINT PK_MESSAGE PRIMARY KEY (messageId)
-);
diff --git a/runtime-acm/src/main/resources/db/changelog/1700/upgrade/0200-messagejob.sql b/runtime-acm/src/main/resources/db/changelog/1700/upgrade/0200-messagejob.sql
deleted file mode 100644 (file)
index 2155dd2..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-CREATE TABLE messagejob (
-  jobId varchar(255) NOT NULL,
-  identificationId varchar(255) NOT NULL,
-  jobStarted timestamp without time zone NOT NULL DEFAULT now(),
-  CONSTRAINT PK_MESSAGE_JOB PRIMARY KEY (jobId)
-);
diff --git a/runtime-acm/src/main/resources/db/changelog/1700/upgrade/0300-messagejob_identificationId_index.sql b/runtime-acm/src/main/resources/db/changelog/1700/upgrade/0300-messagejob_identificationId_index.sql
deleted file mode 100644 (file)
index 26ad6db..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-CREATE UNIQUE INDEX messagejob_identificationId_index ON messagejob(identificationId);
diff --git a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0100-automationcompositionrollback.sql b/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0100-automationcompositionrollback.sql
deleted file mode 100644 (file)
index 1749351..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*\r
- * ============LICENSE_START=======================================================\r
- * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.\r
- *  ================================================================================\r
- *  Licensed under the Apache License, Version 2.0 (the "License");\r
- *  you may not use this file except in compliance with the License.\r
- *  You may obtain a copy of the License at\r
- *\r
- *        http://www.apache.org/licenses/LICENSE-2.0\r
- *  Unless required by applicable law or agreed to in writing, software\r
- *  distributed under the License is distributed on an "AS IS" BASIS,\r
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- *  See the License for the specific language governing permissions and\r
- *  limitations under the License.\r
- *\r
- *  SPDX-License-Identifier: Apache-2.0\r
- *  ============LICENSE_END=========================================================\r
- */\r
-\r
-CREATE TABLE automationcompositionrollback (\r
-  instanceId VARCHAR(255) NOT NULL,\r
-  compositionId VARCHAR(255) NOT NULL,\r
-  elements TEXT NOT NULL,\r
-  CONSTRAINT PK_AUTOMATIONCOMPOSITION_ROLLBACK PRIMARY KEY (instanceId)\r
-);\r
diff --git a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0200-automationcomposition.sql b/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0200-automationcomposition.sql
deleted file mode 100644 (file)
index 31f2d16..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-UPDATE automationcomposition SET deployState = 2 WHERE deployState IS NULL;
-UPDATE automationcomposition SET lockState = 4 WHERE lockState IS NULL;
-UPDATE automationcomposition SET name = '' WHERE name IS NULL;
-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 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;
diff --git a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0300-automationcompositionelement.sql b/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0300-automationcompositionelement.sql
deleted file mode 100644 (file)
index cf2b7cb..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-UPDATE automationcompositionelement SET definition_name = '' WHERE definition_name IS NULL;
-UPDATE automationcompositionelement SET definition_version = '0.0.0' WHERE definition_version IS NULL;
-UPDATE automationcompositionelement SET deploystate = 2 WHERE deploystate IS NULL;
-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 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 '{}';
diff --git a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0400-automationcomposition_fk.sql b/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0400-automationcomposition_fk.sql
deleted file mode 100644 (file)
index 8c1db56..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-ALTER TABLE automationcomposition
-  ADD CONSTRAINT ac_composition_fk
-  FOREIGN KEY (compositionId)
-  REFERENCES automationcompositiondefinition (compositionId)
-  ON UPDATE RESTRICT
-  ON DELETE RESTRICT;
diff --git a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0500-automationcompositiondefinition.sql b/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0500-automationcompositiondefinition.sql
deleted file mode 100644 (file)
index 7f5a03c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-UPDATE automationcompositiondefinition SET name = '' WHERE name IS NULL;
-UPDATE automationcompositiondefinition SET version  = '1.0.0' WHERE version IS NULL;
-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 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;
diff --git a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0600-nodetemplatestate.sql b/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0600-nodetemplatestate.sql
deleted file mode 100644 (file)
index 03bb998..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-UPDATE nodetemplatestate SET nodeTemplate_name  = '' WHERE nodeTemplate_name IS NULL;
-UPDATE nodetemplatestate SET nodeTemplate_version = '1.0.0' WHERE nodeTemplate_version IS NULL;
-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 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;
diff --git a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0700-mb_identificationId_index.sql b/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0700-mb_identificationId_index.sql
deleted file mode 100644 (file)
index 3387c2d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-CREATE INDEX mb_identificationId_index ON message(identificationId);
diff --git a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0800-participantreplica.sql b/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0800-participantreplica.sql
deleted file mode 100644 (file)
index 8790500..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-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 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;
diff --git a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0900-participantsupportedacelements.sql b/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0900-participantsupportedacelements.sql
deleted file mode 100644 (file)
index 8ded46a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-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 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/1702/upgrade/0100-automationcomposition.sql b/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0100-automationcomposition.sql
deleted file mode 100644 (file)
index 2fe170d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-ALTER TABLE automationcomposition
- ADD COLUMN revisionId VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
-ALTER TABLE automationcomposition ALTER COLUMN phase TYPE INTEGER;
-ALTER TABLE automationcomposition DROP COLUMN restarting;
diff --git a/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0200-automationcompositiondefinition.sql b/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0200-automationcompositiondefinition.sql
deleted file mode 100644 (file)
index 53c24c5..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-ALTER TABLE automationcompositiondefinition
- ADD COLUMN revisionId VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
-ALTER TABLE automationcompositiondefinition DROP COLUMN restarting;
diff --git a/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0300-automationcompositionelement.sql b/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0300-automationcompositionelement.sql
deleted file mode 100644 (file)
index c50d58b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-ALTER TABLE automationcompositionelement ALTER COLUMN stage TYPE INTEGER;
diff --git a/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0400-participant.sql b/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0400-participant.sql
deleted file mode 100644 (file)
index 7b06e27..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-ALTER TABLE participant DROP COLUMN participantState;
-ALTER TABLE participant DROP COLUMN lastMsg;
diff --git a/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0500-participantreplica.sql b/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0500-participantreplica.sql
deleted file mode 100644 (file)
index 294256b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * ============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=========================================================
- */
-
-ALTER TABLE participantreplica ALTER COLUMN participantId DROP DEFAULT;
index 4041c5f..1628bb8 100644 (file)
@@ -28,8 +28,21 @@ databaseChangeLog:
             - tableExists:
                 tableName: automationcomposition
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/0100-automationcomposition.sql
+        - sql:
+            sql: |
+              CREATE TABLE automationcomposition (
+                instanceId VARCHAR(255) NOT NULL,
+                compositionId VARCHAR(255),
+                compositionTargetId VARCHAR(255),
+                deployState SMALLINT DEFAULT NULL,
+                description VARCHAR(255),
+                lockState SMALLINT DEFAULT NULL,
+                name VARCHAR(255),
+                restarting BOOLEAN,
+                stateChangeResult SMALLINT DEFAULT NULL,
+                version VARCHAR(255),
+                CONSTRAINT PK_AUTOMATIONCOMPOSITION PRIMARY KEY (instanceId)
+              );
 
   - changeSet:
       id: 1400-2
@@ -40,8 +53,18 @@ databaseChangeLog:
             - tableExists:
                 tableName: automationcompositiondefinition
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/0200-automationcompositiondefinition.sql
+        - sql:
+            sql: |
+              CREATE TABLE automationcompositiondefinition (
+                compositionId VARCHAR(255) NOT NULL,
+                name VARCHAR(255),
+                restarting BOOLEAN,
+                serviceTemplate TEXT,
+                state SMALLINT DEFAULT NULL,
+                stateChangeResult SMALLINT DEFAULT NULL,
+                version VARCHAR(255),
+                CONSTRAINT PK_AUTOMATIONCOMPOSITIONDEFINITION PRIMARY KEY (compositionId)
+              );
 
   - changeSet:
       id: 1400-3
@@ -52,8 +75,25 @@ databaseChangeLog:
             - tableExists:
                 tableName: automationcompositionelement
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/0300-automationcompositionelement.sql
+        - sql:
+            sql: |
+              CREATE TABLE automationcompositionelement (
+                elementId VARCHAR(255) NOT NULL,
+                definition_name VARCHAR(255),
+                definition_version VARCHAR(255),
+                deployState SMALLINT DEFAULT NULL,
+                description VARCHAR(255),
+                instanceId VARCHAR(255),
+                lockState SMALLINT DEFAULT NULL,
+                message VARCHAR(255),
+                operationalState VARCHAR(255),
+                outProperties TEXT,
+                participantId VARCHAR(255),
+                properties TEXT,
+                restarting BOOLEAN,
+                useState VARCHAR(255),
+                CONSTRAINT PK_AUTOMATIONCOMPOSITIONELEMENT PRIMARY KEY (elementId)
+              );
 
   - changeSet:
       id: 1400-4
@@ -64,8 +104,20 @@ databaseChangeLog:
             - tableExists:
                 tableName: nodetemplatestate
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/0400-nodetemplatestate.sql
+        - sql:
+            sql: |
+              CREATE TABLE nodetemplatestate (
+                nodeTemplateStateId VARCHAR(255) NOT NULL,
+                compositionId VARCHAR(255),
+                message VARCHAR(255),
+                nodeTemplate_name VARCHAR(255),
+                nodeTemplate_version VARCHAR(255),
+                outProperties TEXT,
+                participantId VARCHAR(255),
+                restarting BOOLEAN,
+                state SMALLINT DEFAULT NULL,
+                CONSTRAINT PK_NODETEMPLATESTATE PRIMARY KEY (nodeTemplateStateId)
+              );
 
   - changeSet:
       id: 1400-5
@@ -76,8 +128,14 @@ databaseChangeLog:
             - tableExists:
                 tableName: participant
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/0500-participant.sql
+        - sql:
+            sql: |
+              CREATE TABLE participant (
+                participantId VARCHAR(255) NOT NULL,
+                description VARCHAR(255),
+                participantState SMALLINT DEFAULT NULL,
+                CONSTRAINT PK_PARTICIPANT PRIMARY KEY (participantId)
+              );
 
   - changeSet:
       id: 1400-6
@@ -88,8 +146,15 @@ databaseChangeLog:
             - tableExists:
                 tableName: participantsupportedacelements
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/0600-participantsupportedelements.sql
+        - sql:
+            sql: |
+              CREATE TABLE participantsupportedacelements (
+                id VARCHAR(255) NOT NULL,
+                participantId VARCHAR(255),
+                typeName VARCHAR(255),
+                typeVersion VARCHAR(255),
+                CONSTRAINT PK_PARTICIPANTSUPPORTEDACELEMENTS PRIMARY KEY (id)
+              );
 
   - changeSet:
       id: 1400-7
@@ -100,8 +165,8 @@ databaseChangeLog:
             - indexExists:
                 indexName: ac_compositionId
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/0700-ac_compositionId_index.sql
+        - sql:
+            sql: CREATE INDEX ac_compositionId ON automationcomposition(compositionId);
 
   - changeSet:
       id: 1400-8
@@ -112,8 +177,8 @@ databaseChangeLog:
             - indexExists:
                 indexName: ac_element_fk
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/0800-ac_element_fk_index.sql
+        - sql:
+            sql: CREATE INDEX ac_element_fk ON automationcompositionelement(instanceId);
 
   - changeSet:
       id: 1400-9
@@ -124,8 +189,8 @@ databaseChangeLog:
             - indexExists:
                 indexName: dt_element_fk
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/0900-dt_element_fk_index.sql
+        - sql:
+            sql: CREATE INDEX dt_element_fk ON nodetemplatestate(compositionId);
 
   - changeSet:
       id: 1400-10
@@ -136,8 +201,8 @@ databaseChangeLog:
             - indexExists:
                 indexName: supported_element_fk
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/1000-supported_element_fk_index.sql
+        - sql:
+            sql: CREATE INDEX supported_element_fk ON participantsupportedacelements(participantId);
 
   - changeSet:
       id: 1400-11
@@ -149,8 +214,14 @@ databaseChangeLog:
                 foreignKeyName: ac_element_fk
                 foreignKeyTableName: automationcompositionelement
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/1100-automationcompositionelement_fk.sql
+        - sql:
+            sql: |
+              ALTER TABLE automationcompositionelement
+                ADD CONSTRAINT ac_element_fk
+                FOREIGN KEY (instanceId)
+                REFERENCES automationcomposition (instanceId)
+                ON UPDATE RESTRICT
+                ON DELETE RESTRICT;
 
   - changeSet:
       id: 1400-12
@@ -162,8 +233,14 @@ databaseChangeLog:
                 foreignKeyName: dt_element_fk
                 foreignKeyTableName: nodetemplatestate
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/1200-nodetemplate_fk.sql
+        - sql:
+            sql: |
+              ALTER TABLE nodetemplatestate
+                ADD CONSTRAINT dt_element_fk
+                FOREIGN KEY (compositionId)
+                REFERENCES automationcompositiondefinition (compositionId)
+                ON UPDATE RESTRICT
+                ON DELETE RESTRICT;
 
   - changeSet:
       id: 1400-13
@@ -175,5 +252,11 @@ databaseChangeLog:
                 foreignKeyName: supported_element_fk
                 foreignKeyTableName: participantsupportedacelements
       changes:
-        - sqlFile:
-            path: db/changelog/1400/upgrade/1300-participantsupportedelements_fk.sql
+        - sql:
+            sql: |
+              ALTER TABLE participantsupportedacelements
+                ADD CONSTRAINT supported_element_fk
+                FOREIGN KEY (participantId)
+                REFERENCES participant (participantId)
+                ON UPDATE RESTRICT
+                ON DELETE RESTRICT;
index a4e9107..12af985 100644 (file)
@@ -29,8 +29,11 @@ databaseChangeLog:
                 tableName: automationcomposition
                 columnName: lastMsg
       changes:
-        - sqlFile:
-            path: db/changelog/1500/upgrade/0100-automationcomposition.sql
+        - sql:
+            sql: |
+              ALTER TABLE automationcomposition ADD lastMsg timestamp without time zone DEFAULT Now();
+              ALTER TABLE automationcomposition ADD phase SMALLINT DEFAULT 0;
+              UPDATE automationcomposition SET restarting = NULL;
 
   - changeSet:
       id: 1500-2
@@ -42,8 +45,10 @@ databaseChangeLog:
                 tableName: automationcompositiondefinition
                 columnName: lastMsg
       changes:
-        - sqlFile:
-            path: db/changelog/1500/upgrade/0200-automationcompositiondefinition.sql
+        - sql:
+            sql: |
+              ALTER TABLE automationcompositiondefinition ADD lastMsg timestamp without time zone DEFAULT Now();
+              UPDATE automationcompositiondefinition SET restarting = NULL;
 
   - changeSet:
       id: 1500-3
@@ -54,8 +59,15 @@ databaseChangeLog:
             - tableExists:
                 tableName: participantreplica
       changes:
-        - sqlFile:
-            path: db/changelog/1500/upgrade/0300-participantreplica.sql
+        - sql:
+            sql: |
+              CREATE TABLE participantreplica (
+                replicaId varchar(255) NOT NULL,
+                lastMsg timestamp without time zone DEFAULT Now(),
+                participantId varchar(255) DEFAULT NULL,
+                participantState SMALLINT DEFAULT NULL,
+                CONSTRAINT PK_PARTICIPANT_REPLICA PRIMARY KEY (replicaId)
+              );
 
   - changeSet:
       id: 1500-4
@@ -67,8 +79,8 @@ databaseChangeLog:
                 tableName: participant
                 columnName: lastMsg
       changes:
-        - sqlFile:
-            path: db/changelog/1500/upgrade/0400-participant.sql
+        - sql:
+            sql: ALTER TABLE participant ADD lastMsg timestamp without time zone DEFAULT Now();
 
   - changeSet:
       id: 1500-5
@@ -79,8 +91,8 @@ databaseChangeLog:
             - indexExists:
                 indexName: participant_replica_fk
       changes:
-        - sqlFile:
-            path: db/changelog/1500/upgrade/0500-participant_replica_fk_index.sql
+        - sql:
+            sql: CREATE INDEX participant_replica_fk ON participantreplica(participantId);
 
   - changeSet:
       id: 1500-6
@@ -92,19 +104,25 @@ databaseChangeLog:
                 foreignKeyName: participant_replica_fk
                 foreignKeyTableName: participantreplica
       changes:
-        - sqlFile:
-            path: db/changelog/1500/upgrade/0600-participant_replica_fk.sql
+        - sql:
+            sql: |
+              ALTER TABLE participantreplica
+                ADD CONSTRAINT participant_replica_fk
+                FOREIGN KEY (participantId)
+                REFERENCES participant (participantId)
+                ON UPDATE RESTRICT
+                ON DELETE RESTRICT;
 
   - changeSet:
       id: 1500-7
       author: policy
       changes:
-        - sqlFile:
-            path: db/changelog/1500/upgrade/0700-automationcompositionelement.sql
+        - sql:
+            sql: UPDATE automationcompositionelement SET restarting = NULL;
 
   - changeSet:
       id: 1500-8
       author: policy
       changes:
-        - sqlFile:
-            path: db/changelog/1500/upgrade/0800-nodetemplatestate.sql
+        - sql:
+            sql: UPDATE nodetemplatestate SET restarting = NULL;
index 751331b..db873f5 100644 (file)
@@ -29,8 +29,8 @@ databaseChangeLog:
                 tableName: automationcomposition
                 columnName: subState
       changes:
-        - sqlFile:
-            path: db/changelog/1600/upgrade/0100-automationcomposition.sql
+        - sql:
+            sql: ALTER TABLE automationcomposition ADD subState SMALLINT DEFAULT NULL;
 
   - changeSet:
       id: 1600-2
@@ -42,5 +42,7 @@ databaseChangeLog:
                 tableName: automationcompositionelement
                 columnName: subState
       changes:
-        - sqlFile:
-            path: db/changelog/1600/upgrade/0200-automationcompositionelement.sql
+        - sql:
+            sql: |
+              ALTER TABLE automationcompositionelement ADD subState SMALLINT DEFAULT NULL;
+              ALTER TABLE automationcompositionelement ADD stage SMALLINT DEFAULT NULL;
index ac2d3aa..604c062 100644 (file)
@@ -23,12 +23,14 @@ databaseChangeLog:
       id: 1601-1
       author: policy
       changes:
-        - sqlFile:
-            path: db/changelog/1601/upgrade/0100-automationcomposition.sql
+        - sql:
+            sql: UPDATE automationcomposition SET subState=0 WHERE subState is NULL;
 
   - changeSet:
       id: 1601-2
       author: policy
       changes:
-        - sqlFile:
-            path: db/changelog/1601/upgrade/0200-automationcompositionelement.sql
+        - sql:
+            sql: |
+              UPDATE automationcompositionelement SET subState=0 WHERE subState is NULL;
+              UPDATE automationcompositionelement SET stage=0 WHERE stage is NULL;
index 572b8a5..a1f0918 100644 (file)
@@ -28,8 +28,15 @@ databaseChangeLog:
             - tableExists:
                 tableName: message
       changes:
-        - sqlFile:
-            path: db/changelog/1700/upgrade/0100-message.sql
+        - sql:
+            sql: |
+              CREATE TABLE message (
+                messageId varchar(255) NOT NULL,
+                identificationId varchar(255) NOT NULL,
+                lastMsg timestamp without time zone NOT NULL DEFAULT now(),
+                docMessage text NOT NULL,
+                CONSTRAINT PK_MESSAGE PRIMARY KEY (messageId)
+              );
 
   - changeSet:
       id: 1700-2
@@ -40,8 +47,14 @@ databaseChangeLog:
             - tableExists:
                 tableName: messagejob
       changes:
-        - sqlFile:
-            path: db/changelog/1700/upgrade/0200-messagejob.sql
+        - sql:
+            sql: |
+              CREATE TABLE messagejob (
+                jobId varchar(255) NOT NULL,
+                identificationId varchar(255) NOT NULL,
+                jobStarted timestamp without time zone NOT NULL DEFAULT now(),
+                CONSTRAINT PK_MESSAGE_JOB PRIMARY KEY (jobId)
+              );
 
   - changeSet:
       id: 1700-3
@@ -52,5 +65,5 @@ databaseChangeLog:
             - indexExists:
                 indexName: messagejob_identificationId_index
       changes:
-        - sqlFile:
-            path: db/changelog/1700/upgrade/0300-messagejob_identificationId_index.sql
+        - sql:
+            sql: CREATE UNIQUE INDEX messagejob_identificationId_index ON messagejob(identificationId);
index 8a08c55..1dcc25c 100644 (file)
@@ -28,22 +28,67 @@ databaseChangeLog:
             - tableExists:
                 tableName: automationcompositionrollback
       changes:
-        - sqlFile:
-            path: db/changelog/1701/upgrade/0100-automationcompositionrollback.sql
+        - sql:
+            sql: |
+              CREATE TABLE automationcompositionrollback (
+                instanceId VARCHAR(255) NOT NULL,
+                compositionId VARCHAR(255) NOT NULL,
+                elements TEXT NOT NULL,
+                CONSTRAINT PK_AUTOMATIONCOMPOSITION_ROLLBACK PRIMARY KEY (instanceId)
+              );
 
   - changeSet:
       id: 1701-2
       author: policy
       changes:
-        - sqlFile:
-            path: db/changelog/1701/upgrade/0200-automationcomposition.sql
+        - sql:
+            sql: |
+              UPDATE automationcomposition SET deployState = 2 WHERE deployState IS NULL;
+              UPDATE automationcomposition SET lockState = 4 WHERE lockState IS NULL;
+              UPDATE automationcomposition SET name = '' WHERE name IS NULL;
+              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 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;
 
   - changeSet:
       id: 1701-3
       author: policy
       changes:
-        - sqlFile:
-            path: db/changelog/1701/upgrade/0300-automationcompositionelement.sql
+        - sql:
+            sql: |
+              UPDATE automationcompositionelement SET definition_name = '' WHERE definition_name IS NULL;
+              UPDATE automationcompositionelement SET definition_version = '0.0.0' WHERE definition_version IS NULL;
+              UPDATE automationcompositionelement SET deploystate = 2 WHERE deploystate IS NULL;
+              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 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 '{}';
 
   - changeSet:
       id: 1701-4
@@ -55,22 +100,56 @@ databaseChangeLog:
                 foreignKeyName: ac_composition_fk
                 foreignKeyTableName: automationcomposition
       changes:
-        - sqlFile:
-            path: db/changelog/1701/upgrade/0400-automationcomposition_fk.sql
+        - sql:
+            sql: |
+              ALTER TABLE automationcomposition
+                ADD CONSTRAINT ac_composition_fk
+                FOREIGN KEY (compositionId)
+                REFERENCES automationcompositiondefinition (compositionId)
+                ON UPDATE RESTRICT
+                ON DELETE RESTRICT;
 
   - changeSet:
       id: 1701-5
       author: policy
       changes:
-        - sqlFile:
-            path: db/changelog/1701/upgrade/0500-automationcompositiondefinition.sql
+        - sql:
+            sql: |
+              UPDATE automationcompositiondefinition SET name = '' WHERE name IS NULL;
+              UPDATE automationcompositiondefinition SET version  = '1.0.0' WHERE version IS NULL;
+              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 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;
 
   - changeSet:
       id: 1701-6
       author: policy
       changes:
-        - sqlFile:
-            path: db/changelog/1701/upgrade/0600-nodetemplatestate.sql
+        - sql:
+            sql: |
+              UPDATE nodetemplatestate SET nodeTemplate_name  = '' WHERE nodeTemplate_name IS NULL;
+              UPDATE nodetemplatestate SET nodeTemplate_version = '1.0.0' WHERE nodeTemplate_version IS NULL;
+              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 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;
 
   - changeSet:
       id: 1701-7
@@ -81,19 +160,36 @@ databaseChangeLog:
             - indexExists:
                 indexName: mb_identificationId_index
       changes:
-        - sqlFile:
-            path: db/changelog/1701/upgrade/0700-mb_identificationId_index.sql
+        - sql:
+            sql: CREATE INDEX mb_identificationId_index ON message(identificationId);
 
   - changeSet:
       id: 1701-8
       author: policy
       changes:
-        - sqlFile:
-            path: db/changelog/1701/upgrade/0800-participantreplica.sql
+        - sql:
+            sql: |
+              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 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;
 
   - changeSet:
       id: 1701-9
       author: policy
       changes:
-        - sqlFile:
-            path: db/changelog/1701/upgrade/0900-participantsupportedacelements.sql
+        - sql:
+            sql: |
+              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 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';
index 4c17cef..b5bff2d 100644 (file)
 
 databaseChangeLog:
   - objectQuotingStrategy: QUOTE_ONLY_RESERVED_WORDS
+
+  - changeSet:
+      author: policy
+      id: 1702-1
+      preConditions:
+        - onFail: MARK_RAN
+        - not:
+            - columnExists:
+                tableName: automationcomposition
+                columnName: revisionId
+      changes:
+        - sql:
+            sql: |
+              ALTER TABLE automationcomposition
+               ADD COLUMN revisionId VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
+              ALTER TABLE automationcomposition ALTER COLUMN phase TYPE INTEGER;
+              ALTER TABLE automationcomposition DROP COLUMN restarting;
+
   - changeSet:
       author: policy
-      id: 1702
+      id: 1702-2
       preConditions:
-        not:
-          columnExists:
-            tableName: automationcomposition
-            columnName: revisionId
-        onFail: MARK_RAN
+        - onFail: MARK_RAN
+        - not:
+            - columnExists:
+                tableName: automationcompositiondefinition
+                columnName: revisionId
+      changes:
+        - sql:
+            sql: |
+              ALTER TABLE automationcompositiondefinition
+               ADD COLUMN revisionId VARCHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
+              ALTER TABLE automationcompositiondefinition DROP COLUMN restarting;
+
+  - changeSet:
+      author: policy
+      id: 1702-3
+      changes:
+        - sql:
+            sql: ALTER TABLE automationcompositionelement ALTER COLUMN stage TYPE INTEGER;
+
+  - changeSet:
+      author: policy
+      id: 1702-4
+      preConditions:
+        - onFail: MARK_RAN
+        - columnExists:
+            tableName: participant
+            columnName: participantState
+      changes:
+        - sql:
+            sql: |
+              ALTER TABLE participant DROP COLUMN participantState;
+              ALTER TABLE participant DROP COLUMN lastMsg;
+
+  - changeSet:
+      author: policy
+      id: 1702-5
       changes:
-        - sqlFile:
-            path: db/changelog/1702/upgrade/0100-automationcomposition.sql
-        - sqlFile:
-            path: db/changelog/1702/upgrade/0200-automationcompositiondefinition.sql
-        - sqlFile:
-            path: db/changelog/1702/upgrade/0300-automationcompositionelement.sql
-        - sqlFile:
-            path: db/changelog/1702/upgrade/0400-participant.sql
-        - sqlFile:
-            path: db/changelog/1702/upgrade/0500-participantreplica.sql
+        - sql:
+            sql: ALTER TABLE participantreplica ALTER COLUMN participantId DROP DEFAULT;