From adff0ca3305166eabaff2a2a3a684c6dc102a298 Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Thu, 17 Jul 2025 18:47:19 +0100 Subject: [PATCH] Inline SQL files in Liquibase changelog (Liquibase #7) 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 --- .../1400/upgrade/0100-automationcomposition.sql | 32 ----- .../0200-automationcompositiondefinition.sql | 29 ----- .../upgrade/0300-automationcompositionelement.sql | 36 ------ .../1400/upgrade/0400-nodetemplatestate.sql | 31 ----- .../db/changelog/1400/upgrade/0500-participant.sql | 25 ---- .../upgrade/0600-participantsupportedelements.sql | 26 ---- .../1400/upgrade/0700-ac_compositionId_index.sql | 20 --- .../1400/upgrade/0800-ac_element_fk_index.sql | 20 --- .../1400/upgrade/0900-dt_element_fk_index.sql | 20 --- .../upgrade/1000-supported_element_fk_index.sql | 20 --- .../1100-automationcompositionelement_fk.sql | 25 ---- .../1400/upgrade/1200-nodetemplate_fk.sql | 25 ---- .../1300-participantsupportedelements_fk.sql | 25 ---- .../1500/upgrade/0100-automationcomposition.sql | 22 ---- .../0200-automationcompositiondefinition.sql | 21 ---- .../1500/upgrade/0300-participantreplica.sql | 27 ----- .../db/changelog/1500/upgrade/0400-participant.sql | 20 --- .../upgrade/0500-participant_replica_fk_index.sql | 20 --- .../1500/upgrade/0600-participant_replica_fk.sql | 25 ---- .../upgrade/0700-automationcompositionelement.sql | 20 --- .../1500/upgrade/0800-nodetemplatestate.sql | 20 --- .../1600/upgrade/0100-automationcomposition.sql | 20 --- .../upgrade/0200-automationcompositionelement.sql | 21 ---- .../1601/upgrade/0100-automationcomposition.sql | 20 --- .../upgrade/0200-automationcompositionelement.sql | 21 ---- .../db/changelog/1700/upgrade/0100-message.sql | 26 ---- .../db/changelog/1700/upgrade/0200-messagejob.sql | 25 ---- .../0300-messagejob_identificationId_index.sql | 20 --- .../upgrade/0100-automationcompositionrollback.sql | 25 ---- .../1701/upgrade/0200-automationcomposition.sql | 38 ------ .../upgrade/0300-automationcompositionelement.sql | 39 ------ .../1701/upgrade/0400-automationcomposition_fk.sql | 25 ---- .../0500-automationcompositiondefinition.sql | 34 ------ .../1701/upgrade/0600-nodetemplatestate.sql | 32 ----- .../upgrade/0700-mb_identificationId_index.sql | 20 --- .../1701/upgrade/0800-participantreplica.sql | 27 ----- .../0900-participantsupportedacelements.sql | 28 ----- .../1702/upgrade/0100-automationcomposition.sql | 23 ---- .../0200-automationcompositiondefinition.sql | 22 ---- .../upgrade/0300-automationcompositionelement.sql | 20 --- .../db/changelog/1702/upgrade/0400-participant.sql | 21 ---- .../1702/upgrade/0500-participantreplica.sql | 20 --- .../resources/db/changelog/changelog-1400.yaml | 135 +++++++++++++++++---- .../resources/db/changelog/changelog-1500.yaml | 50 +++++--- .../resources/db/changelog/changelog-1600.yaml | 10 +- .../resources/db/changelog/changelog-1601.yaml | 10 +- .../resources/db/changelog/changelog-1700.yaml | 25 +++- .../resources/db/changelog/changelog-1701.yaml | 132 +++++++++++++++++--- .../resources/db/changelog/changelog-1702.yaml | 73 ++++++++--- 49 files changed, 345 insertions(+), 1126 deletions(-) delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/0100-automationcomposition.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/0200-automationcompositiondefinition.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/0300-automationcompositionelement.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/0400-nodetemplatestate.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/0500-participant.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/0600-participantsupportedelements.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/0700-ac_compositionId_index.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/0800-ac_element_fk_index.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/0900-dt_element_fk_index.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/1000-supported_element_fk_index.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/1100-automationcompositionelement_fk.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/1200-nodetemplate_fk.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1400/upgrade/1300-participantsupportedelements_fk.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1500/upgrade/0100-automationcomposition.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1500/upgrade/0200-automationcompositiondefinition.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1500/upgrade/0300-participantreplica.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1500/upgrade/0400-participant.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1500/upgrade/0500-participant_replica_fk_index.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1500/upgrade/0600-participant_replica_fk.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1500/upgrade/0700-automationcompositionelement.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1500/upgrade/0800-nodetemplatestate.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1600/upgrade/0100-automationcomposition.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1600/upgrade/0200-automationcompositionelement.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1601/upgrade/0100-automationcomposition.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1601/upgrade/0200-automationcompositionelement.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1700/upgrade/0100-message.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1700/upgrade/0200-messagejob.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1700/upgrade/0300-messagejob_identificationId_index.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1701/upgrade/0100-automationcompositionrollback.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1701/upgrade/0200-automationcomposition.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1701/upgrade/0300-automationcompositionelement.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1701/upgrade/0400-automationcomposition_fk.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1701/upgrade/0500-automationcompositiondefinition.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1701/upgrade/0600-nodetemplatestate.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1701/upgrade/0700-mb_identificationId_index.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1701/upgrade/0800-participantreplica.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1701/upgrade/0900-participantsupportedacelements.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1702/upgrade/0100-automationcomposition.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1702/upgrade/0200-automationcompositiondefinition.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1702/upgrade/0300-automationcompositionelement.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1702/upgrade/0400-participant.sql delete mode 100644 runtime-acm/src/main/resources/db/changelog/1702/upgrade/0500-participantreplica.sql 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 index 414247e51..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0100-automationcomposition.sql +++ /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 index 7ae65f0c5..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0200-automationcompositiondefinition.sql +++ /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 index 41c4adc35..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0300-automationcompositionelement.sql +++ /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 index 9af1632b8..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0400-nodetemplatestate.sql +++ /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 index 5f98f57a4..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0500-participant.sql +++ /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 index c6ae4ce57..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0600-participantsupportedelements.sql +++ /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 index 4eeb41dd2..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0700-ac_compositionId_index.sql +++ /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 index 316a393ce..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0800-ac_element_fk_index.sql +++ /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 index cac331933..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/0900-dt_element_fk_index.sql +++ /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 index a1e66c5ef..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1000-supported_element_fk_index.sql +++ /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 index b67d208b4..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1100-automationcompositionelement_fk.sql +++ /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 index da9ee2ff6..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1200-nodetemplate_fk.sql +++ /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 index 8099b58aa..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1400/upgrade/1300-participantsupportedelements_fk.sql +++ /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 index 5b251f61a..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0100-automationcomposition.sql +++ /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 index 5acec8cff..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0200-automationcompositiondefinition.sql +++ /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 index d6247293a..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0300-participantreplica.sql +++ /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 index 214fa0787..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0400-participant.sql +++ /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 index 071535153..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0500-participant_replica_fk_index.sql +++ /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 index 274711931..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0600-participant_replica_fk.sql +++ /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 index 44090a22f..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0700-automationcompositionelement.sql +++ /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 index 898a51661..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1500/upgrade/0800-nodetemplatestate.sql +++ /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 index ea392a42f..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1600/upgrade/0100-automationcomposition.sql +++ /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 index af5f7cefa..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1600/upgrade/0200-automationcompositionelement.sql +++ /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 index 6ff43b655..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1601/upgrade/0100-automationcomposition.sql +++ /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 index 25c98494f..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1601/upgrade/0200-automationcompositionelement.sql +++ /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 index 1b81716e3..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1700/upgrade/0100-message.sql +++ /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 index 2155dd209..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1700/upgrade/0200-messagejob.sql +++ /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 index 26ad6db84..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1700/upgrade/0300-messagejob_identificationId_index.sql +++ /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 index 174935191..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0100-automationcompositionrollback.sql +++ /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 automationcompositionrollback ( - instanceId VARCHAR(255) NOT NULL, - compositionId VARCHAR(255) NOT NULL, - elements TEXT NOT NULL, - CONSTRAINT PK_AUTOMATIONCOMPOSITION_ROLLBACK PRIMARY KEY (instanceId) -); 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 index 31f2d1693..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0200-automationcomposition.sql +++ /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 index cf2b7cb95..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0300-automationcompositionelement.sql +++ /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 index 8c1db5648..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0400-automationcomposition_fk.sql +++ /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 index 7f5a03c02..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0500-automationcompositiondefinition.sql +++ /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 index 03bb998c9..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0600-nodetemplatestate.sql +++ /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 index 3387c2d6a..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0700-mb_identificationId_index.sql +++ /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 index 879050098..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0800-participantreplica.sql +++ /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 index 8ded46afe..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1701/upgrade/0900-participantsupportedacelements.sql +++ /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 index 2fe170d4c..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0100-automationcomposition.sql +++ /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 index 53c24c5bd..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0200-automationcompositiondefinition.sql +++ /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 index c50d58b45..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0300-automationcompositionelement.sql +++ /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 index 7b06e271a..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0400-participant.sql +++ /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 index 294256b90..000000000 --- a/runtime-acm/src/main/resources/db/changelog/1702/upgrade/0500-participantreplica.sql +++ /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; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml index 4041c5ffa..1628bb89e 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1400.yaml @@ -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; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml index a4e9107b0..12af985f7 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1500.yaml @@ -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; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml index 751331b9f..db873f5d5 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1600.yaml @@ -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; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml index ac2d3aa9e..604c062bb 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1601.yaml @@ -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; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml index 572b8a516..a1f09185b 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1700.yaml @@ -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); diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml index 8a08c55ac..1dcc25c0e 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1701.yaml @@ -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'; diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1702.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1702.yaml index 4c17cefa3..b5bff2d41 100644 --- a/runtime-acm/src/main/resources/db/changelog/changelog-1702.yaml +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1702.yaml @@ -18,23 +18,64 @@ 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; -- 2.16.6