From 08348bbf6f74e2c335bb42e7fb5df993b477f3ad Mon Sep 17 00:00:00 2001 From: rameshiyer27 Date: Thu, 6 Mar 2025 10:33:03 +0000 Subject: [PATCH] Fix db-migrator issue when upgrading clamp Issue-ID: POLICY-5281 Change-Id: I71e198ed12c8e31c76a1be3a32f43b825fb213ce Signed-off-by: rameshiyer27 --- .../1601/upgrade/0100-automationcomposition.sql | 20 ++++++++++++++++++++ .../upgrade/0200-automationcompositionelement.sql | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 policy-db-migrator/src/main/docker/config/clampacm/postgres/1601/upgrade/0100-automationcomposition.sql create mode 100644 policy-db-migrator/src/main/docker/config/clampacm/postgres/1601/upgrade/0200-automationcompositionelement.sql 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; -- 2.16.6