diff db_schema/setup-db.sh @ 928:6ab17d8b5558

erase mpr_id values in lada_data.sql
author Michael Stanko <mstanko@bfs.de>
date Wed, 04 May 2016 08:07:31 +0200
parents 2b746f4e97d6
children d3d9cd5e18f8
line wrap: on
line diff
--- a/db_schema/setup-db.sh	Fri Apr 29 16:40:26 2016 +0200
+++ b/db_schema/setup-db.sh	Wed May 04 08:07:31 2016 +0200
@@ -2,7 +2,7 @@
 DIR=`dirname $0`
 
 ROLE_NAME=${1:-lada}
-echo "DROLE_NAME = $ROLE_NAME="
+echo "DROLE_NAME = $ROLE_NAME"
 ROLE_PW=${2:-$ROLE_NAME}
 echo "ROLE_PW = $ROLE_PW"
 DB_NAME=${3:-$ROLE_NAME}
@@ -14,13 +14,12 @@
   DB_CONNECT_STRING="$DB_CONNECT_STRING -p $DB_PORT"
 fi
 DB_CONNECT_STRING="$DB_CONNECT_STRING -U postgres"
-echo "DB_CONNECT_STRING =  $DB_CONNECT_STRING"
+echo "DB_CONNECT_STRING = $DB_CONNECT_STRING"
 
 if [ `psql $DB_CONNECT_STRING -t --command "SELECT count(*) FROM pg_catalog.pg_user WHERE usename = '$ROLE_NAME'"` -eq 0 ] ; then
   echo create user $ROLE_NAME
   psql $DB_CONNECT_STRING --command "CREATE USER $ROLE_NAME PASSWORD '$ROLE_PW';"
 fi
-exit
 
 if psql -h test-pgsql1-fr.lab.bfs.de -U postgres -l | grep -q "^ $DB_NAME " ; then
   echo drop db $DB_NAME 
@@ -30,7 +29,6 @@
 echo create db $DB_NAME
 psql $DB_CONNECT_STRING --command \
      "CREATE DATABASE $DB_NAME WITH OWNER = $ROLE_NAME ENCODING = 'UTF8'"
-exit
 
 echo create postgis extention
 psql $DB_CONNECT_STRING -d $DB_NAME  --command  \
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)