changeset 378:88aa790d1437

Do not assume existance of a specific database in setup In case the invoking database user has no database of the same name, we can just use the database we want to create anyhow.
author Tom Gottfried <tom@intevation.de>
date Fri, 10 Aug 2018 13:42:51 +0200
parents 220a893318fa
children 367346975513
files schema/install-db.sh
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/schema/install-db.sh	Fri Aug 10 13:36:24 2018 +0200
+++ b/schema/install-db.sh	Fri Aug 10 13:42:51 2018 +0200
@@ -97,8 +97,8 @@
 
 if [[ drop -eq 0 ]] ; then
   # Default operation: create schema
-  psql -q -p "$port" -f "$BASEDIR/roles.sql"
   createdb -p "$port" "$db"
+  psql -q -p "$port" -f "$BASEDIR/roles.sql" -d "$db"
   psql -qtv ON_ERROR_STOP= -p "$port" -d "$db" \
        -c "SET client_min_messages TO WARNING;" \
        -f "$BASEDIR/gemma.sql" \