fix migration when iterating through DBs
Change-Id: Ib243572c2395c9e122af3bff24d1fd8b89300166
Issue-ID: POLICY-357
Signed-off-by: Jorge Hernandez <jh1730@att.com>
diff --git a/policy-management/src/main/server-gen/bin/db-migrator b/policy-management/src/main/server-gen/bin/db-migrator
index 328ad0b..1024005 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 @@
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 @@
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 "\