MT#63753 update db schema skip site_id check for non db nodes

* site_id is not checked for non db nodes, when revisions are applied,
  as site_id there is always null and on db nodes when something is
  applied, it becomes not null.

(cherry picked from commit 8cd03ea4a4)
(cherry picked from commit 3b02189dea)

Change-Id: I2b9521db44bf8e3b519f3542046fd87027736c8c
mr13.5.1
Kirill Solomko 1 week ago committed by Sipwise Jenkins Builder
parent 6f8e0ff9ec
commit 78bd9a503c

@ -1432,10 +1432,12 @@ def post_set_release_for_applied_revisions() -> None:
return
node_name = config.node_name
node_roles = config.node_roles
is_db_role = node_roles.get('ngcp_is_db') is True
release = getattr(config, 'set_release', config.ngcp_version)
cursor: pymysql.cursors.Cursor = config.db_conn.cursor()
if check_column_exists('site_id'):
if is_db_role and check_column_exists('site_id'):
site_id = int(config.node_roles.get('ngcp_site_id') or 1)
post_set_revisions = config._post_set_release_for_revisions
cursor.execute(f"""

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save