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 3143cc8e60)
Change-Id: I25a0b4d1a3449830de568c17ced5b0633c7e1bb8
mr12.5
Mykola Malkov 5 months ago
parent acdf9d7c97
commit b79e417e29

@ -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

Loading…
Cancel
Save