From 4dfaabe584f9208e03ab2b77274e6fdfdae007af Mon Sep 17 00:00:00 2001 From: Jorge Hernandez Date: Thu, 19 Oct 2017 14:09:51 -0500 Subject: fix migration when iterating through DBs Change-Id: Ib243572c2395c9e122af3bff24d1fd8b89300166 Issue-ID: POLICY-357 Signed-off-by: Jorge Hernandez --- policy-management/src/main/server-gen/bin/db-migrator | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'policy-management/src/main/server-gen/bin/db-migrator') diff --git a/policy-management/src/main/server-gen/bin/db-migrator b/policy-management/src/main/server-gen/bin/db-migrator index 328ad0b5..10240052 100644 --- a/policy-management/src/main/server-gen/bin/db-migrator +++ b/policy-management/src/main/server-gen/bin/db-migrator @@ -485,10 +485,10 @@ until [[ -z "$1" ]]; do MIGRATION_DIR=$1 ;; -t|--target) shift - TARGET_RELEASE=$1 + INPUT_TARGET_RELEASE=$1 ;; -f|--from) shift - CURRENT_RELEASE=$1 + INPUT_CURRENT_RELEASE=$1 ;; -o|--operation) shift OPERATION=$1 @@ -555,6 +555,8 @@ for dbPath in ${SCHEMA_S}; do UPGRADE_DIR="${MIGRATION_DIR}"/"${SCHEMA}"/sql DOWNGRADE_DIR=${UPGRADE_DIR} METADATA_HISTORY="${METADATA_DB}.\`${SCHEMA}_history\`" + TARGET_RELEASE=${INPUT_TARGET_RELEASE} + CURRENT_RELEASE=${INPUT_CURRENT_RELEASE} if is_upgrade && is_downgrade; then echo "${SCHEMA}: failure: invalid configuration: ${UPGRADE_SQL_SUFFIX} and "\ -- cgit 1.2.3-korg