summaryrefslogtreecommitdiffstats
path: root/components/datalake-handler/des/src/assembly/init_db/scripts/db_init/11_create-database
diff options
context:
space:
mode:
Diffstat (limited to 'components/datalake-handler/des/src/assembly/init_db/scripts/db_init/11_create-database')
-rw-r--r--components/datalake-handler/des/src/assembly/init_db/scripts/db_init/11_create-database7
1 files changed, 2 insertions, 5 deletions
diff --git a/components/datalake-handler/des/src/assembly/init_db/scripts/db_init/11_create-database b/components/datalake-handler/des/src/assembly/init_db/scripts/db_init/11_create-database
index 773f9c48..f69f1ab1 100644
--- a/components/datalake-handler/des/src/assembly/init_db/scripts/db_init/11_create-database
+++ b/components/datalake-handler/des/src/assembly/init_db/scripts/db_init/11_create-database
@@ -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.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.sql