From: danielhanrahan Date: Wed, 12 Nov 2025 13:08:44 +0000 (+0000) Subject: Remove incorrect default value for participantId X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F142413%2F4;p=policy%2Fclamp.git Remove incorrect default value for participantId ParticipantSupportedAcElements.participantId should not have a default value set in the database, as it is a foreign key to Participant table Issue-ID: POLICY-5422 Change-Id: Iecf703b132e5dd2d1d52e009a5335f4fdb0f8a14 Signed-off-by: danielhanrahan --- diff --git a/runtime-acm/src/main/resources/db/changelog/changelog-1801.yaml b/runtime-acm/src/main/resources/db/changelog/changelog-1801.yaml new file mode 100644 index 000000000..798050d33 --- /dev/null +++ b/runtime-acm/src/main/resources/db/changelog/changelog-1801.yaml @@ -0,0 +1,40 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +databaseChangeLog: + - objectQuotingStrategy: QUOTE_ONLY_RESERVED_WORDS + + - changeSet: + author: policy + id: 1801-1 + changes: + - dropDefaultValue: + tableName: ParticipantSupportedAcElements + columnName: participantId + rollback: + - addDefaultValue: + tableName: ParticipantSupportedAcElements + columnName: participantId + defaultValue: '' + + - changeSet: + id: 1801-tag + author: policy + changes: + - tagDatabase: + tag: 1801 diff --git a/runtime-acm/src/main/resources/db/changelog/db.changelog-master.yaml b/runtime-acm/src/main/resources/db/changelog/db.changelog-master.yaml index 4474c5d91..66ed1e197 100644 --- a/runtime-acm/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/runtime-acm/src/main/resources/db/changelog/db.changelog-master.yaml @@ -32,3 +32,5 @@ databaseChangeLog: file: db/changelog/changelog-1702.yaml - include: file: db/changelog/changelog-1800.yaml + - include: + file: db/changelog/changelog-1801.yaml diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/liquibase/LiquibaseRollbackTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/liquibase/LiquibaseRollbackTest.java index 1919c253d..2f997bda1 100644 --- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/liquibase/LiquibaseRollbackTest.java +++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/liquibase/LiquibaseRollbackTest.java @@ -143,7 +143,8 @@ class LiquibaseRollbackTest { Arguments.of("1600", "1700"), Arguments.of("1700", "1701"), Arguments.of("1701", "1702"), - Arguments.of("1702", "1800") + Arguments.of("1702", "1800"), + Arguments.of("1800", "1801") ); }