From b79e417e295234b62dc1c6d689af93b76c42c910 Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Thu, 28 Nov 2024 16:52:28 +0200 Subject: [PATCH] MT#61408 Don't fail if there is no revisions to delete This is rollback case if during the upgrade there is no not_replicated sql scripts. In 1st run of 'ngcp-update-db-schema --downgrade-release' deletes all the records will be deleted on sp1. So the next run on sp2 finds no records to delete and it's ok. So don't fail on this case. Change-Id: Ifcdd6cb369eaa0da0167c50023e5502e06aa3a8a (cherry picked from commit 3143cc8e6042160eae97f3e126c261e9db07f0a6) Change-Id: I25a0b4d1a3449830de568c17ced5b0633c7e1bb8 --- ngcp-update-db-schema | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ngcp-update-db-schema b/ngcp-update-db-schema index 9fd19e2f..84dd70a2 100755 --- a/ngcp-update-db-schema +++ b/ngcp-update-db-schema @@ -935,13 +935,13 @@ def get_db_schema() -> DBSchema: if config.mode == 'down' and not db_schema: if config.downgrade_release: - error(c_str(f""" - could not find entries in db_schema \ + log(c_str(f""" + could not find entries in db_schema table matching release '{config.downgrade_release}' """)) else: - error('could not find entries in db_schema') - shutdown(1) + log('could not find entries in db_schema') + shutdown(0) return db_schema