From: danielhanrahan Date: Thu, 23 Oct 2025 11:12:14 +0000 (+0100) Subject: Remove clamp acm SQL files from DB-migrator X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F142313%2F1;p=policy%2Fdocker.git Remove clamp acm SQL files from DB-migrator Issue-ID: POLICY-5400 Change-Id: I80cd4a56d95218fb25351af8e11c116c662b9be0 Signed-off-by: danielhanrahan --- diff --git a/policy-db-migrator/smoke-test/postgres-clamp-tests.sh b/policy-db-migrator/smoke-test/postgres-clamp-tests.sh deleted file mode 100755 index eaf4107b..00000000 --- a/policy-db-migrator/smoke-test/postgres-clamp-tests.sh +++ /dev/null @@ -1,260 +0,0 @@ -#!/bin/sh -#============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================================================= -# shellcheck disable=SC2039 -# shellcheck disable=SC2086 -# shellcheck disable=SC2012 -echo "Start of test $(date +%F-%T)" - -export POLICY_HOME=/opt/app/policy -export SQL_USER=${PGSQL_USER} -export SQL_PASSWORD=${PGSQL_PASSWORD} -export SCRIPT_DIRECTORY=postgres -export SCHEMA=clampacm - -# Test variables -TOTAL_COUNT=0 -A_UPGRADE_COUNT=$(ls /home/${SCHEMA}/postgres/1400/upgrade/*.sql | wc -l) -A_DOWNGRADE_COUNT=$(ls /home/${SCHEMA}/postgres/1400/downgrade/*.sql | wc -l) -TOTAL_SQLS_UPGRADE=$A_UPGRADE_COUNT -TOTAL_SQLS_DOWNGRADE=$A_DOWNGRADE_COUNT - -B_UPGRADE_COUNT=$(ls /home/${SCHEMA}/postgres/1500/upgrade/*.sql | wc -l) -B_DOWNGRADE_COUNT=$(ls /home/${SCHEMA}/postgres/1500/downgrade/*.sql | wc -l) -TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$B_UPGRADE_COUNT)) -TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$B_DOWNGRADE_COUNT)) - -C_UPGRADE_COUNT=$(ls /home/${SCHEMA}/postgres/1600/upgrade/*.sql | wc -l) -C_DOWNGRADE_COUNT=$(ls /home/${SCHEMA}/postgres/1600/downgrade/*.sql | wc -l) -TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$C_UPGRADE_COUNT)) -TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$C_DOWNGRADE_COUNT)) - -D_UPGRADE_COUNT_A=$(ls /home/${SCHEMA}/postgres/1601/upgrade/*.sql | wc -l) -D_UPGRADE_COUNT_B=$(ls /home/${SCHEMA}/postgres/1700/upgrade/*.sql | wc -l) -D_UPGRADE_COUNT=$(($D_UPGRADE_COUNT_A+$D_UPGRADE_COUNT_B)) -D_DOWNGRADE_COUNT_A=$(ls /home/${SCHEMA}/postgres/1601/downgrade/*.sql | wc -l) -D_DOWNGRADE_COUNT_B=$(ls /home/${SCHEMA}/postgres/1700/downgrade/*.sql | wc -l) -D_DOWNGRADE_COUNT=$(($D_DOWNGRADE_COUNT_A+$D_DOWNGRADE_COUNT_B)) -TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$D_UPGRADE_COUNT)) -TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$D_DOWNGRADE_COUNT)) - -E_UPGRADE_COUNT=$(ls /home/${SCHEMA}/postgres/1701/upgrade/*.sql | wc -l) -E_DOWNGRADE_COUNT=$(ls /home/${SCHEMA}/postgres/1701/downgrade/*.sql | wc -l) -TOTAL_SQLS_UPGRADE=$(($TOTAL_SQLS_UPGRADE+$E_UPGRADE_COUNT)) -TOTAL_SQLS_DOWNGRADE=$(($TOTAL_SQLS_DOWNGRADE+$E_DOWNGRADE_COUNT)) - -NEW_SQL_EXECUTIONS=0 -PREVIOUS_SQL_EXECUTIONS=0 -RECENT_SQL_EXECUTIONS=0 -TEST_STATUS="FAIL" -TEST_MSG="" -TESTS=0 -PASSED=0 -FAILED=0 - -run_sql() { - local user="${1}" schema="${2}" sql="${3}" - PGSQL="psql -U ${user} -d ${schema} -h ${SQL_HOST}" - ${PGSQL} --command "${sql}" - return $? -} - -start_test() { - echo "" - echo "############################################################################################################" - echo "" - let TESTS=$TESTS+1 - echo "Starting test $TESTS" - PREVIOUS_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS -} - -end_test() { - echo "Ending test $TESTS" - reportStatus=$(/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o report | tail -3) - echo "Status: $reportStatus" - RECENT_SQL_EXECUTIONS=$(echo $reportStatus | cut -f1 -d' ' | sed 's/(//') -} - -check_results() { - local operation="${1}" startVer="${2}" endVer="${3}" newRecords="${4}" filesRan="${5}" - - echo "" - echo "Test summary: operation:$operation, from:$startVer, to:$endVer, new executions:$newRecords, sqlFiles:$filesRan" - # Convert to number - startVer=$(echo ${startVer} | awk '{$0=int($0)}1') - endVer=$(echo ${endVer} | awk '{$0=int($0)}1') - - if [ ${startVer} -eq ${endVer} ] && [ $newRecords -eq $filesRan ] && [ $newRecords -eq 0 ]; then - TEST_MSG="No ${operation} required" - TEST_STATUS="PASS" - let PASSED=$PASSED+1 - elif [ "${operation}" == "upgrade" ] && [ ${startVer} -le ${endVer} ] && [ $newRecords -eq $filesRan ]; then - TEST_MSG="Successful ${operation}" - TEST_STATUS="PASS" - let PASSED=$PASSED+1 - elif [ "${operation}" == "downgrade" ] && [ ${startVer} -ge ${endVer} ] && [ $newRecords -eq $filesRan ]; then - TEST_MSG="Successful ${operation}" - TEST_STATUS="PASS" - let PASSED=$PASSED+1 - else - TEST_MSG="Errors occurred during ${operation}" - TEST_STATUS="FAIL" - let FAILED=$FAILED+1 - fi - echo "" - echo "*** Test $TESTS: $TEST_STATUS , $TEST_MSG, current version: $END_VERSION ***" - echo "" -} - -# Test 1 - Upgrade to 1701 -start_test -/opt/app/policy/bin/prepare_upgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o upgrade -t 1701 -end_test -let TOTAL_COUNT=$A_UPGRADE_COUNT+$B_UPGRADE_COUNT+$C_UPGRADE_COUNT+$D_UPGRADE_COUNT+$E_UPGRADE_COUNT -check_results 'upgrade' "0" "1701" $RECENT_SQL_EXECUTIONS $TOTAL_COUNT - -sleep 5 - -# Test 2 - downgrade to 1700 -start_test -/opt/app/policy/bin/prepare_downgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o downgrade -f 1701 -t 1700 -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results 'downgrade' "1701" "1700" $NEW_SQL_EXECUTIONS $E_DOWNGRADE_COUNT - -sleep 5 - -# Test 3 - downgrade to 1600 -start_test -/opt/app/policy/bin/prepare_downgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o downgrade -f 1700 -t 1600 -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results 'downgrade' "1700" "1600" $NEW_SQL_EXECUTIONS $D_DOWNGRADE_COUNT - -sleep 5 - -# Test 4 - downgrade to 1500 -start_test -/opt/app/policy/bin/prepare_downgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o downgrade -f 1600 -t 1500 -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results 'downgrade' "1600" "1500" $NEW_SQL_EXECUTIONS $C_DOWNGRADE_COUNT - -sleep 5 - -# Test 5 - downgrade to 1400 -start_test -/opt/app/policy/bin/prepare_downgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o downgrade -f 1500 -t 1400 -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results 'downgrade' "1500" "1400" $NEW_SQL_EXECUTIONS $B_DOWNGRADE_COUNT - -sleep 5 - -# Test 6 - upgrade to 1500 -start_test -/opt/app/policy/bin/prepare_upgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o upgrade -f 1400 -t 1500 -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results 'upgrade' "1400" "1500" $NEW_SQL_EXECUTIONS $B_UPGRADE_COUNT - -sleep 5 - -# Test 7 - upgrade to 1500 -start_test -/opt/app/policy/bin/prepare_upgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o upgrade -f 1500 -t 1600 -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results 'upgrade' "1500" "1600" $NEW_SQL_EXECUTIONS $C_UPGRADE_COUNT - -sleep 5 - -# Test 8 - upgrade to 1700 -start_test -/opt/app/policy/bin/prepare_upgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o upgrade -f 1600 -t 1700 -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results 'upgrade' "1600" "1700" $NEW_SQL_EXECUTIONS $D_UPGRADE_COUNT - -sleep 5 - -# Test 9 - upgrade to 1701 -start_test -/opt/app/policy/bin/prepare_upgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o upgrade -f 1700 -t 1701 -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results 'upgrade' "1700" "1701" $NEW_SQL_EXECUTIONS $E_UPGRADE_COUNT - -sleep 5 - -# Test 10 - run upgrade on db where tables already exist and migration schema is empty -start_test -/opt/app/policy/bin/prepare_downgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o downgrade -f 1701 -t 1400 -run_sql $SQL_USER "migration" "DROP TABLE IF EXISTS migration;" -/opt/app/policy/bin/prepare_upgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o upgrade -t 1701 -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -let TOTAL_COUNT=$B_UPGRADE_COUNT+$B_DOWNGRADE_COUNT+$C_UPGRADE_COUNT+$C_DOWNGRADE_COUNT+$D_UPGRADE_COUNT+$D_DOWNGRADE_COUNT+$E_UPGRADE_COUNT+$E_DOWNGRADE_COUNT -check_results 'upgrade' "1701" "1701" $NEW_SQL_EXECUTIONS $TOTAL_COUNT - -#sleep 5 - -# Test 11 - Full downgrade -start_test -/opt/app/policy/bin/prepare_downgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o downgrade -f 1701 -t 0 -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results 'downgrade' "1701" "0" $NEW_SQL_EXECUTIONS $TOTAL_SQLS_DOWNGRADE - -sleep 5 - -# Test 12 - Full upgrade -start_test -/opt/app/policy/bin/prepare_upgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o upgrade -end_test -let NEW_SQL_EXECUTIONS=$RECENT_SQL_EXECUTIONS-$PREVIOUS_SQL_EXECUTIONS -check_results 'upgrade' "0" "1701" $NEW_SQL_EXECUTIONS $TOTAL_SQLS_UPGRADE - -# Install database -/opt/app/policy/bin/prepare_upgrade.sh ${SCHEMA} -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o upgrade -/opt/app/policy/bin/db-migrator-pg -s ${SCHEMA} -o report - -echo -echo "-----------------------------------------------------------------------" -echo "Number of Tests: $TESTS, Tests Passed: $PASSED, Tests Failed: $FAILED" -echo "-----------------------------------------------------------------------" - -echo "End of test $(date +%F-%T)" - -nc -lk -p 6824 - -exit 0 diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0100-automationcomposition.sql deleted file mode 100644 index 222e2aa1..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0100-automationcomposition.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP TABLE automationcomposition; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0200-automationcompositiondefinition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0200-automationcompositiondefinition.sql deleted file mode 100644 index 167ce939..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0200-automationcompositiondefinition.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP TABLE automationcompositiondefinition; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0300-automationcompositionelement.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0300-automationcompositionelement.sql deleted file mode 100644 index 044f107d..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0300-automationcompositionelement.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP TABLE automationcompositionelement; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0400-nodetemplatestate.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0400-nodetemplatestate.sql deleted file mode 100644 index 0a646818..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0400-nodetemplatestate.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP TABLE nodetemplatestate; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0500-participant.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0500-participant.sql deleted file mode 100644 index 8f7f1e8a..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0500-participant.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP TABLE participant; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0600-participantsupportedelements.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0600-participantsupportedelements.sql deleted file mode 100644 index 8b3d4dee..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0600-participantsupportedelements.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP TABLE participantsupportedacelements; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0700-ac_compositionId_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0700-ac_compositionId_index.sql deleted file mode 100644 index c4b65323..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0700-ac_compositionId_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP INDEX IF EXISTS ac_compositionid; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0800-ac_element_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0800-ac_element_fk_index.sql deleted file mode 100644 index c21fd9e3..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0800-ac_element_fk_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP INDEX IF EXISTS ac_element_fk; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0900-dt_element_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0900-dt_element_fk_index.sql deleted file mode 100644 index ed57c52f..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/0900-dt_element_fk_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP INDEX IF EXISTS dt_element_fk; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1000-supported_element_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1000-supported_element_fk_index.sql deleted file mode 100644 index 41b93291..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1000-supported_element_fk_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP INDEX IF EXISTS supported_element_fk; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1100-automationcompositionelement_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1100-automationcompositionelement_fk.sql deleted file mode 100644 index 9b19dc02..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1100-automationcompositionelement_fk.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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 DROP CONSTRAINT IF EXISTS ac_element_fk; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1200-nodetemplate_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1200-nodetemplate_fk.sql deleted file mode 100644 index f8736caa..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1200-nodetemplate_fk.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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 DROP CONSTRAINT IF EXISTS dt_element_fk; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1300-participantsupportedelements_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1300-participantsupportedelements_fk.sql deleted file mode 100644 index 60e00eed..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/downgrade/1300-participantsupportedelements_fk.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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 DROP CONSTRAINT IF EXISTS supported_element_fk; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0100-automationcomposition.sql deleted file mode 100644 index 37dc2968..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0100-automationcomposition.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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)); \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0200-automationcompositiondefinition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0200-automationcompositiondefinition.sql deleted file mode 100644 index fc486832..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0200-automationcompositiondefinition.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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)); \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0300-automationcompositionelement.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0300-automationcompositionelement.sql deleted file mode 100644 index 302fcbc0..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0300-automationcompositionelement.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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)); \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0400-nodetemplatestate.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0400-nodetemplatestate.sql deleted file mode 100644 index d5454af4..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0400-nodetemplatestate.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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)); \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0500-participant.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0500-participant.sql deleted file mode 100644 index 08a8cf01..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0500-participant.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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)); \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0600-participantsupportedelements.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0600-participantsupportedelements.sql deleted file mode 100644 index fbda69d5..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0600-participantsupportedelements.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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)); \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0700-ac_compositionId_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0700-ac_compositionId_index.sql deleted file mode 100644 index fce99716..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0700-ac_compositionId_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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); \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0800-ac_element_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0800-ac_element_fk_index.sql deleted file mode 100644 index 520019b8..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0800-ac_element_fk_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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); \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0900-dt_element_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0900-dt_element_fk_index.sql deleted file mode 100644 index cfbafea5..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/0900-dt_element_fk_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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); \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1000-supported_element_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1000-supported_element_fk_index.sql deleted file mode 100644 index 13e1905f..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1000-supported_element_fk_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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); \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1100-automationcompositionelement_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1100-automationcompositionelement_fk.sql deleted file mode 100644 index f6a24b96..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1100-automationcompositionelement_fk.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1200-nodetemplate_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1200-nodetemplate_fk.sql deleted file mode 100644 index 5f294ced..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1200-nodetemplate_fk.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1300-participantsupportedelements_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1300-participantsupportedelements_fk.sql deleted file mode 100644 index dd60a3da..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1400/upgrade/1300-participantsupportedelements_fk.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0100-automationcomposition.sql deleted file mode 100644 index a4263782..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0100-automationcomposition.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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 DROP lastMsg, DROP phase; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0200-automationcompositiondefinition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0200-automationcompositiondefinition.sql deleted file mode 100644 index cac95376..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0200-automationcompositiondefinition.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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 DROP lastMsg; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0300-participantreplica.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0300-participantreplica.sql deleted file mode 100644 index d5f7871b..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0300-participantreplica.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP TABLE participantreplica; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0400-participant.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0400-participant.sql deleted file mode 100644 index 10ddaaf6..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0400-participant.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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 lastMsg; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0500-participant_replica_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0500-participant_replica_fk_index.sql deleted file mode 100644 index ab9012c5..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0500-participant_replica_fk_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP INDEX IF EXISTS participant_replica_fk; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0600-participant_replica_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0600-participant_replica_fk.sql deleted file mode 100644 index 36709b10..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/downgrade/0600-participant_replica_fk.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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 DROP CONSTRAINT IF EXISTS participant_replica_fk; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0100-automationcomposition.sql deleted file mode 100644 index c1e4bb43..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0100-automationcomposition.sql +++ /dev/null @@ -1,21 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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(), ADD phase SMALLINT DEFAULT 0; -UPDATE automationcomposition SET restarting = NULL; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0200-automationcompositiondefinition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0200-automationcompositiondefinition.sql deleted file mode 100644 index 25a773bd..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0200-automationcompositiondefinition.sql +++ /dev/null @@ -1,21 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0300-participantreplica.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0300-participantreplica.sql deleted file mode 100644 index 4543272b..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0300-participantreplica.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0400-participant.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0400-participant.sql deleted file mode 100644 index 97ae43a3..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0400-participant.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0500-participant_replica_fk_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0500-participant_replica_fk_index.sql deleted file mode 100644 index bc506e99..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0500-participant_replica_fk_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0600-participant_replica_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0600-participant_replica_fk.sql deleted file mode 100644 index 3341d8e0..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0600-participant_replica_fk.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0700-automationcompositionelement.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0700-automationcompositionelement.sql deleted file mode 100644 index 03ab8a49..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0700-automationcompositionelement.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0800-nodetemplatestate.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0800-nodetemplatestate.sql deleted file mode 100644 index 1114a597..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1500/upgrade/0800-nodetemplatestate.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/downgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/downgrade/0100-automationcomposition.sql deleted file mode 100644 index f0897cfe..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/downgrade/0100-automationcomposition.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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 DROP subState; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/downgrade/0200-automationcompositionelement.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/downgrade/0200-automationcompositionelement.sql deleted file mode 100644 index ef6f3c79..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/downgrade/0200-automationcompositionelement.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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 DROP subState, DROP stage; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/upgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/upgrade/0100-automationcomposition.sql deleted file mode 100644 index b3ec5f96..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/upgrade/0100-automationcomposition.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/upgrade/0200-automationcompositionelement.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/upgrade/0200-automationcompositionelement.sql deleted file mode 100644 index 3e91bbf7..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1600/upgrade/0200-automationcompositionelement.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2024 Nordix Foundation - * ================================================================================ - * 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, ADD stage SMALLINT DEFAULT NULL; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1601/upgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1601/upgrade/0100-automationcomposition.sql deleted file mode 100644 index e4aae8fc..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1601/upgrade/0100-automationcomposition.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2025 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1601/upgrade/0200-automationcompositionelement.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1601/upgrade/0200-automationcompositionelement.sql deleted file mode 100644 index ad9469cd..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1601/upgrade/0200-automationcompositionelement.sql +++ /dev/null @@ -1,21 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2025 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/downgrade/0100-message.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/downgrade/0100-message.sql deleted file mode 100644 index 2bec3fb3..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/downgrade/0100-message.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2025 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP TABLE message; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/downgrade/0200-messagejob.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/downgrade/0200-messagejob.sql deleted file mode 100644 index e4b56251..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/downgrade/0200-messagejob.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2025 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP TABLE messagejob; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/downgrade/0300-messagejob_identificationId_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/downgrade/0300-messagejob_identificationId_index.sql deleted file mode 100644 index d54f5381..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/downgrade/0300-messagejob_identificationId_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2025 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP INDEX IF EXISTS messagejob_identificationId_index; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/upgrade/0100-message.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/upgrade/0100-message.sql deleted file mode 100644 index f13f3b8e..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/upgrade/0100-message.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2025 Nordix Foundation - * ================================================================================ - * 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 IF NOT EXISTS 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/upgrade/0200-messagejob.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/upgrade/0200-messagejob.sql deleted file mode 100644 index ea6d7baa..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/upgrade/0200-messagejob.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2025 Nordix Foundation - * ================================================================================ - * 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 IF NOT EXISTS 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/upgrade/0300-messagejob_identificationId_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/upgrade/0300-messagejob_identificationId_index.sql deleted file mode 100644 index 4d512dc5..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1700/upgrade/0300-messagejob_identificationId_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2025 Nordix Foundation - * ================================================================================ - * 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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0100-automationcompositionrollback.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0100-automationcompositionrollback.sql deleted file mode 100644 index 02bbd969..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0100-automationcompositionrollback.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========================================================= - */ - -DROP TABLE automationcompositionrollback; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0200-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0200-automationcomposition.sql deleted file mode 100644 index 94368097..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0200-automationcomposition.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========================================================= - */ - -ALTER TABLE automationcomposition - ALTER COLUMN compositionid DROP NOT NULL, - ALTER COLUMN name DROP NOT NULL, - ALTER COLUMN name DROP DEFAULT, - ALTER COLUMN version DROP NOT NULL, - ALTER COLUMN version DROP DEFAULT, - ALTER COLUMN deployState DROP NOT NULL, - ALTER COLUMN deployState DROP DEFAULT, - ALTER COLUMN lockState DROP NOT NULL, - ALTER COLUMN lockState DROP DEFAULT, - ALTER COLUMN SubState DROP NOT NULL, - ALTER COLUMN SubState DROP DEFAULT, - ALTER COLUMN lastMsg DROP NOT NULL; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0300-automationcompositionelement.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0300-automationcompositionelement.sql deleted file mode 100644 index fd82c090..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0300-automationcompositionelement.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========================================================= - */ - -ALTER TABLE automationcompositionelement - ALTER COLUMN definition_name DROP NOT NULL, - ALTER COLUMN definition_name DROP DEFAULT, - ALTER COLUMN definition_version DROP NOT NULL, - ALTER COLUMN definition_version DROP DEFAULT, - ALTER COLUMN deploystate DROP NOT NULL, - ALTER COLUMN deployState DROP DEFAULT, - ALTER COLUMN lockState DROP NOT NULL, - ALTER COLUMN lockState DROP DEFAULT, - ALTER COLUMN substate DROP NOT NULL, - ALTER COLUMN substate DROP DEFAULT, - ALTER COLUMN outproperties DROP NOT NULL, - ALTER COLUMN outproperties DROP DEFAULT, - ALTER COLUMN properties DROP NOT NULL, - ALTER COLUMN properties DROP DEFAULT; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0400-automationcomposition_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0400-automationcomposition_fk.sql deleted file mode 100644 index c9dead30..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0400-automationcomposition_fk.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 automationcomposition DROP CONSTRAINT IF EXISTS ac_composition_fk; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0500-automationcompositiondefinition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0500-automationcompositiondefinition.sql deleted file mode 100644 index d4133820..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0500-automationcompositiondefinition.sql +++ /dev/null @@ -1,29 +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 - ALTER COLUMN name DROP NOT NULL, - ALTER COLUMN name DROP DEFAULT, - ALTER COLUMN version DROP NOT NULL, - ALTER COLUMN version DROP DEFAULT, - ALTER COLUMN state DROP NOT NULL, - ALTER COLUMN state DROP DEFAULT, - ALTER COLUMN serviceTemplate DROP NOT NULL, - ALTER COLUMN serviceTemplate DROP DEFAULT, - ALTER COLUMN lastMsg DROP NOT NULL; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0600-nodetemplatestate.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0600-nodetemplatestate.sql deleted file mode 100644 index a648d8fe..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0600-nodetemplatestate.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========================================================= - */ - -ALTER TABLE nodetemplatestate - ALTER COLUMN nodeTemplate_name DROP NOT NULL, - ALTER COLUMN nodeTemplate_name DROP DEFAULT, - ALTER COLUMN nodeTemplate_version DROP NOT NULL, - ALTER COLUMN nodeTemplate_version DROP DEFAULT, - ALTER COLUMN outProperties DROP NOT NULL, - ALTER COLUMN outProperties DROP DEFAULT, - ALTER COLUMN state DROP NOT NULL, - ALTER COLUMN state DROP DEFAULT; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0700-mb_identificationId_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0700-mb_identificationId_index.sql deleted file mode 100644 index 404a12fd..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0700-mb_identificationId_index.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2025 Nordix Foundation - * ================================================================================ - * 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========================================================= - */ - -DROP INDEX IF EXISTS mb_identificationId_index; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0800-participantreplica.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0800-participantreplica.sql deleted file mode 100644 index ba2d8fc0..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0800-participantreplica.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 participantreplica - ALTER COLUMN lastMsg DROP NOT NULL, - ALTER COLUMN participantId DROP NOT NULL, - ALTER COLUMN participantId DROP DEFAULT, - ALTER COLUMN participantState DROP NOT NULL, - ALTER COLUMN participantState DROP DEFAULT; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0900-participantsupportedacelements.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0900-participantsupportedacelements.sql deleted file mode 100644 index 32b99f54..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/downgrade/0900-participantsupportedacelements.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========================================================= - */ - -ALTER TABLE participantsupportedacelements - ALTER COLUMN participantId DROP NOT NULL, - ALTER COLUMN participantId DROP DEFAULT, - ALTER COLUMN typeName DROP NOT NULL, - ALTER COLUMN typeName DROP DEFAULT, - ALTER COLUMN typeVersion DROP NOT NULL, - ALTER COLUMN typeVersion DROP DEFAULT; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0100-automationcompositionrollback.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0100-automationcompositionrollback.sql deleted file mode 100644 index 1ecd5286..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0100-automationcompositionrollback.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 TABLE automationcompositionrollback (instanceId VARCHAR(255) NOT NULL, compositionId VARCHAR(255) NOT NULL, elements TEXT NOT NULL, CONSTRAINT PK_AUTOMATIONCOMPOSITION_ROLLBACK PRIMARY KEY (instanceId)) WITHOUT OIDS; \ No newline at end of file diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0200-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0200-automationcomposition.sql deleted file mode 100644 index 3bc96f29..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0200-automationcomposition.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 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 COLUMN name SET DEFAULT '', - ALTER COLUMN name SET NOT NULL, - ALTER COLUMN version SET DEFAULT '1.0.0', - ALTER COLUMN version SET NOT NULL, - ALTER COLUMN deployState SET DEFAULT 2, - ALTER COLUMN deployState SET NOT NULL, - ALTER COLUMN lockState SET DEFAULT 4, - ALTER COLUMN lockState SET NOT NULL, - ALTER COLUMN SubState SET DEFAULT 0, - ALTER COLUMN SubState SET NOT NULL, - ALTER COLUMN lastMsg SET NOT NULL; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0300-automationcompositionelement.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0300-automationcompositionelement.sql deleted file mode 100644 index 91764546..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0300-automationcompositionelement.sql +++ /dev/null @@ -1,40 +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 COLUMN definition_name SET DEFAULT '', - ALTER COLUMN definition_version SET NOT NULL, - ALTER COLUMN definition_version SET DEFAULT '0.0.0', - ALTER COLUMN deploystate SET NOT NULL, - ALTER COLUMN deployState SET DEFAULT 2, - ALTER COLUMN lockState SET NOT NULL, - ALTER COLUMN lockState SET DEFAULT 4, - ALTER COLUMN substate SET NOT NULL, - ALTER COLUMN substate SET DEFAULT 0, - ALTER COLUMN outproperties SET NOT NULL, - ALTER COLUMN outproperties SET DEFAULT '{}', - ALTER COLUMN properties SET NOT NULL, - ALTER COLUMN properties SET DEFAULT '{}'; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0400-automationcomposition_fk.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0400-automationcomposition_fk.sql deleted file mode 100644 index 0b0fbddc..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0400-automationcomposition_fk.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 automationcomposition ADD CONSTRAINT ac_composition_fk FOREIGN KEY (compositionId) REFERENCES automationcompositiondefinition (compositionId) ON UPDATE RESTRICT ON DELETE RESTRICT; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0500-automationcompositiondefinition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0500-automationcompositiondefinition.sql deleted file mode 100644 index 99cdbf81..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0500-automationcompositiondefinition.sql +++ /dev/null @@ -1,35 +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 COLUMN name SET DEFAULT '', - ALTER COLUMN version SET NOT NULL, - ALTER COLUMN version SET DEFAULT '1.0.0', - ALTER COLUMN state SET NOT NULL, - ALTER COLUMN state SET DEFAULT 0, - ALTER COLUMN serviceTemplate SET NOT NULL, - ALTER COLUMN serviceTemplate SET DEFAULT '', - ALTER COLUMN lastMsg SET NOT NULL; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0600-nodetemplatestate.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0600-nodetemplatestate.sql deleted file mode 100644 index c72470de..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0600-nodetemplatestate.sql +++ /dev/null @@ -1,33 +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 COLUMN nodeTemplate_name SET DEFAULT '', - ALTER COLUMN nodeTemplate_version SET NOT NULL, - ALTER COLUMN nodeTemplate_version SET DEFAULT '1.0.0', - ALTER COLUMN outProperties SET NOT NULL, - ALTER COLUMN outProperties SET DEFAULT '{}', - ALTER COLUMN state SET NOT NULL, - ALTER COLUMN state SET DEFAULT 0; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0700-mb_identificationId_index.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0700-mb_identificationId_index.sql deleted file mode 100644 index 3387c2d6..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/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/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0800-participantreplica.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0800-participantreplica.sql deleted file mode 100644 index 8a505551..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0800-participantreplica.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 participantreplica set lastMsg = now() where lastMsg is null; -update participantreplica set participantState = '1' where participantState is null; - -ALTER TABLE participantreplica - ALTER COLUMN lastMsg SET NOT NULL, - ALTER COLUMN participantId SET NOT NULL, - ALTER COLUMN participantId SET DEFAULT '', - ALTER COLUMN participantState SET NOT NULL, - ALTER COLUMN participantState SET DEFAULT 1; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0900-participantsupportedacelements.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0900-participantsupportedacelements.sql deleted file mode 100644 index 9a414196..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1701/upgrade/0900-participantsupportedacelements.sql +++ /dev/null @@ -1,29 +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 COLUMN participantId SET DEFAULT '', - ALTER COLUMN typeName SET NOT NULL, - ALTER COLUMN typeName SET DEFAULT '', - ALTER COLUMN typeVersion SET NOT NULL, - ALTER COLUMN typeVersion SET DEFAULT '1.0.0'; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0100-automationcomposition.sql deleted file mode 100644 index 612a02fb..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/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 - DROP COLUMN revisionId, - ALTER COLUMN phase TYPE SMALLINT, - ADD COLUMN restarting BOOLEAN; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0200-automationcompositiondefinition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0200-automationcompositiondefinition.sql deleted file mode 100644 index 4379971e..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/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 - DROP COLUMN revisionId, - ADD COLUMN restarting BOOLEAN; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0300-automationcompositionelement.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0300-automationcompositionelement.sql deleted file mode 100644 index b230e287..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0300-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========================================================= - */ - -ALTER TABLE automationcompositionelement - ALTER COLUMN stage TYPE SMALLINT; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0400-participant.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0400-participant.sql deleted file mode 100644 index 6533d077..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0400-participant.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 participant - ADD COLUMN participantState SMALLINT DEFAULT NULL, - ADD COLUMN lastMsg timestamp without time zone DEFAULT Now(); diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0500-participantreplica.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/0500-participantreplica.sql deleted file mode 100644 index a85f6bf9..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/downgrade/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 SET DEFAULT ''; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0100-automationcomposition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0100-automationcomposition.sql deleted file mode 100644 index 00517e1d..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/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 COLUMN phase TYPE INTEGER, - DROP COLUMN restarting; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0200-automationcompositiondefinition.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0200-automationcompositiondefinition.sql deleted file mode 100644 index 694dd898..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/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', - DROP COLUMN restarting; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0300-automationcompositionelement.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0300-automationcompositionelement.sql deleted file mode 100644 index 31fafb5d..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0300-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========================================================= - */ - -ALTER TABLE automationcompositionelement - ALTER COLUMN stage TYPE INTEGER; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0400-participant.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0400-participant.sql deleted file mode 100644 index 284358ac..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0400-participant.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 participant - DROP COLUMN participantState, - DROP COLUMN lastMsg; diff --git a/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0500-participantreplica.sql b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1702/upgrade/0500-participantreplica.sql deleted file mode 100644 index 294256b9..00000000 --- a/policy-db-migrator/src/main/docker/config/clampacm/postgres/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;