From 146d83af245e2ea10cfebd634aaf16b8650d8ee3 Mon Sep 17 00:00:00 2001 From: Xavier Bustamante Talavera Date: Sun, 16 Sep 2018 15:29:48 +0200 Subject: [PATCH] Fix not creating the DB correctly --- examples/create-db.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/create-db.sh b/examples/create-db.sh index 72fa38b1..d178f005 100644 --- a/examples/create-db.sh +++ b/examples/create-db.sh @@ -2,7 +2,7 @@ # Creates a database, user, and extensions to use Devicehub createdb $1 # Create main database -psql -d $1 -c "CREATE USER dhub WITH PASSWORD 'ereuse';" # Create user devicehub uses to access db -psql -d $1 -c "GRANT ALL PRIVILEGES ON DATABASE devicehub TO dhub;" # Give access to the db +psql -d $1 -c "CREATE USER dhub WITH PASSWORD 'ereuse';" # Create user Devicehub uses to access db +psql -d $1 -c "GRANT ALL PRIVILEGES ON DATABASE $1 TO dhub;" # Give access to the db psql -d $1 -c "CREATE EXTENSION pgcrypto SCHEMA public;" # Enable pgcrypto psql -d $1 -c "CREATE EXTENSION ltree SCHEMA public;" # Enable ltree