Add update statement for updating old sites

Added update statement which will update
old ranger deployment databases to add
ranger region domain name

Change-Id: If0020b8d3e9c5ff2cabfa5d8d6f9656806f2bc6c
This commit is contained in:
jh629g 2020-02-25 11:34:49 -06:00
parent 308b9af12d
commit a5aacaa045

View File

@ -43,11 +43,9 @@ def execute_app_custom_sql(conn):
sql = 'insert ignore into cms_domain(name) values(%s)'
conn.execute(sql, (customer_domain, ))
# TODO(jh629g): resolve errors with automated execution of
# sql command below
# update_regions = "update region set domain_name = '%s'" \
# " where domain_name is NULL or length(domain_name) = 0"
# conn.execute(update_regions, customer_domain)
update_regions = "update region set domain_name = %s" \
" where domain_name is NULL or length(domain_name) = 0"
conn.execute(update_regions, customer_domain)
def execute_purge_uuids_record(conn):