diff options
Diffstat (limited to 'components/datalake-handler/des/src/assembly/init_db/scripts/db_init/20_db-initdb')
-rw-r--r-- | components/datalake-handler/des/src/assembly/init_db/scripts/db_init/20_db-initdb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/components/datalake-handler/des/src/assembly/init_db/scripts/db_init/20_db-initdb b/components/datalake-handler/des/src/assembly/init_db/scripts/db_init/20_db-initdb index abc98552..32986cda 100644 --- a/components/datalake-handler/des/src/assembly/init_db/scripts/db_init/20_db-initdb +++ b/components/datalake-handler/des/src/assembly/init_db/scripts/db_init/20_db-initdb @@ -3,6 +3,7 @@ # ============LICENSE_START========================================== # =================================================================== # Copyright © 2020 China Mobile. All rights reserved. +# Copyright (C) 2021 Wipro Limited. # =================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,8 +19,4 @@ # ============LICENSE_END============================================ # -if [ -f "/tmp/db_exist" ]; then - exit 0 -fi - -cat /home/datalake/init_db_data.sql | mysql -uroot -p"$MYSQL_ROOT_PASSWORD" -h "$MYSQL_HOST" -P "$MYSQL_PORT" || exit 1 +psql -h $PG_HOST -U $PG_USER -d $PG_DB -f /home/datalake/init_db_data.sql |