diff db_schema/setup-db.sh @ 866:d47e6b8f3897

Reorganise database setup scripts. First step towards better readability.
author Tom Gottfried <tom@intevation.de>
date Fri, 05 Feb 2016 17:01:28 +0100
parents e797391714a0
children 51051e85348f
line wrap: on
line diff
--- a/db_schema/setup-db.sh	Fri Feb 05 14:51:14 2016 +0100
+++ b/db_schema/setup-db.sh	Fri Feb 05 17:01:28 2016 +0100
@@ -7,6 +7,11 @@
 
 psql --command "CREATE USER $ROLE_NAME PASSWORD '$ROLE_PW';"
 createdb -E UTF-8 $DB_NAME
+
+psql -d $DB_NAME  --command \
+     "CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public"
+
+psql -d $DB_NAME -f $DIR/stammdaten_schema.sql
 psql -d $DB_NAME -f $DIR/lada_schema.sql
 psql -d $DB_NAME --command \
      "GRANT USAGE ON SCHEMA stammdaten, bund, land TO $ROLE_NAME;
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)