summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2019-04-16 11:00:19 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2019-04-16 11:00:19 +0800
commit0f7c0fc870f8de26385866a0f383b45371774cb4 (patch)
tree6d9ed60eaa1293a3c07c603ff75837598fefc7ad
parent7b8c80815c7adda6f1e1f6508fd80938ae122861 (diff)
Fix docker init sh for vnflcm
Change-Id: I4f4b57cff9627103c43525c6cb092210f3f4cad5 Issue-ID: VFC-1306 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rwxr-xr-xlcm/docker/instance_init.sh11
1 files changed, 2 insertions, 9 deletions
diff --git a/lcm/docker/instance_init.sh b/lcm/docker/instance_init.sh
index 834b8b4a..b226f219 100755
--- a/lcm/docker/instance_init.sh
+++ b/lcm/docker/instance_init.sh
@@ -18,15 +18,8 @@ function create_database {
function migrate_database {
cd /service/vfc/gvnfm/vnflcm/lcm
- python manage.py makemigrations database
- python manage.py migrate --fake
python manage.py migrate
}
-GET_VNFM_DB="show databases like 'gvnfm';"
-VNFM_DB=`mysql -u$MYSQL_ROOT_USER -p$MYSQL_ROOT_PASSWORD -P$MYSQL_PORT -h$MYSQL_IP -e "$GET_VNFM_DB"`
-if [[ "$VNFM_DB" == "" ]]; then
- create_database
- migrate_database
-fi
-
+create_database
+migrate_database