Mercurial > lada > lada-server
diff db_schema/setup-db.sh @ 746:9f3029b5fc90
merged.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 27 Oct 2015 09:59:21 +0100 |
parents | 17165e710631 |
children | 0cf9387c8da2 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/db_schema/setup-db.sh Tue Oct 27 09:59:21 2015 +0100 @@ -0,0 +1,14 @@ +#!/bin/sh +DIR=`dirname $0` + +ROLE_NAME=lada +ROLE_PW=lada +DB_NAME=lada + +psql --command "CREATE USER $ROLE_NAME PASSWORD '$ROLE_PW';" +createdb -E UTF-8 $DB_NAME +psql -d $DB_NAME -f $DIR/lada_schema.sql +psql -d $DB_NAME --command \ + "GRANT USAGE ON SCHEMA stammdaten, bund, land TO $ROLE_NAME; + GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES + ON ALL TABLES IN SCHEMA stammdaten, bund, land TO $ROLE_NAME;"