comparison db_schema/setup-db.sh @ 859:0e895f13f0b6

merged.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 02 Feb 2016 15:33:24 +0100
parents e797391714a0
children d47e6b8f3897
comparison
equal deleted inserted replaced
858:49c88a71909b 859:0e895f13f0b6
1 #!/bin/sh 1 #!/bin/sh
2 DIR=`dirname $0` 2 DIR=`dirname $0`
3 3
4 ROLE_NAME=lada 4 ROLE_NAME=${1:-lada}
5 ROLE_PW=lada 5 ROLE_PW=${2:-$ROLE_NAME}
6 DB_NAME=lada 6 DB_NAME=${3:-$ROLE_NAME}
7 7
8 psql --command "CREATE USER $ROLE_NAME PASSWORD '$ROLE_PW';" 8 psql --command "CREATE USER $ROLE_NAME PASSWORD '$ROLE_PW';"
9 createdb -E UTF-8 $DB_NAME 9 createdb -E UTF-8 $DB_NAME
10 psql -d $DB_NAME -f $DIR/lada_schema.sql 10 psql -d $DB_NAME -f $DIR/lada_schema.sql
11 psql -d $DB_NAME --command \ 11 psql -d $DB_NAME --command \
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)