From: rameshiyer27 Date: Thu, 6 Mar 2025 10:33:03 +0000 (+0000) Subject: Fix db-migrator issue when upgrading clamp X-Git-Tag: 4.1.1~2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F140389%2F4;p=policy%2Fdocker.git Fix db-migrator issue when upgrading clamp Issue-ID: POLICY-5281 Change-Id: I71e198ed12c8e31c76a1be3a32f43b825fb213ce Signed-off-by: rameshiyer27 --- 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 new file mode 100644 index 00000000..e4aae8fc --- /dev/null +++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1601/upgrade/0100-automationcomposition.sql @@ -0,0 +1,20 @@ +/* + * ============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 new file mode 100644 index 00000000..ad9469cd --- /dev/null +++ b/policy-db-migrator/src/main/docker/config/clampacm/postgres/1601/upgrade/0200-automationcompositionelement.sql @@ -0,0 +1,21 @@ +/* + * ============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;