aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2022-06-20 14:34:03 -0500
committerjhh <jorge.hernandez-herrero@att.com>2022-06-20 14:34:03 -0500
commite404c65df661b49d844b2f67fa0076a3a960554a (patch)
treeac0df147e5e15279e9f43c4afe8da1b513ee4aa9 /policy-management
parentead010efb5fca9bd0eaaaa6285de34cdbfef1963 (diff)
Allow for flexible specification of JDBC driver
Issue-ID: POLICY-4177 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: If33934f79dbe41200e57816781089c63f05b8d67
Diffstat (limited to 'policy-management')
-rw-r--r--policy-management/src/main/server-gen/bin/db-migrator9
1 files changed, 7 insertions, 2 deletions
diff --git a/policy-management/src/main/server-gen/bin/db-migrator b/policy-management/src/main/server-gen/bin/db-migrator
index b4602ea8..64d0fcf1 100644
--- a/policy-management/src/main/server-gen/bin/db-migrator
+++ b/policy-management/src/main/server-gen/bin/db-migrator
@@ -3,7 +3,7 @@
# ============LICENSE_START=======================================================
# ONAP
# ================================================================================
-# Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2017-2022 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -530,7 +530,12 @@ if [ -z "${SQL_PORT}" ]; then
export SQL_PORT=3306
fi
-MYSQL="mysql -u${SQL_USER} -p${SQL_PASSWORD} -h ${SQL_HOST} -P ${SQL_PORT}"
+if [ -z "$MYSQL_CMD" ]; then
+ MYSQL_CMD="mysql"
+fi
+
+MYSQL="${MYSQL_CMD} -u${SQL_USER} -p${SQL_PASSWORD} -h ${SQL_HOST} -P ${SQL_PORT}"
+
if ! ${MYSQL} --execute "show databases;" > /dev/null 2>&1; then
echo "error: No DB connectivity to ${SQL_HOST} for ${SQL_USER}"
exit 5