diff options
author | 2019-04-16 12:11:52 +0800 | |
---|---|---|
committer | 2019-04-16 12:11:52 +0800 | |
commit | b1616e343a5b9fb80d72d7d38444909b8831834a (patch) | |
tree | ba27ce7c90f25a5c65889253337129b7d8a109e7 | |
parent | 5404f8ddda434f44862f53ba7262e6882d8c8b81 (diff) |
Fix docker init sh for catalog
Change-Id: I2804cb22a8859b79294beb6c36e1d4c5edda66b7
Issue-ID: VFC-1306
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rwxr-xr-x | docker/instance_init.sh | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/docker/instance_init.sh b/docker/instance_init.sh index 0bee69af..03ea1d9e 100755 --- a/docker/instance_init.sh +++ b/docker/instance_init.sh @@ -19,15 +19,8 @@ function create_database { function migrate_database { cd /service/vfc/nfvo/catalog - python manage.py makemigrations database -# python manage.py migrate --fake python manage.py migrate } -GET_CATALOG_DB="show databases like 'nfvocatalog';" -CATALOG_DB=`mysql -u$MYSQL_ROOT_USER -p$MYSQL_ROOT_PASSWORD -P$MYSQL_PORT -h$MYSQL_IP -e "GET_CATALOG_DB"` -if [[ "$CATALOG_DB" == "" ]]; then - create_database - migrate_database -fi - +create_database +migrate_database |