Mercurial > lada > lada-server
view db_schema/setup-db.sh @ 826:90343e38225f
!!!CAUTION!!! Changed persistence unit JNDI name!
If you are updating to this version you have to change the JNDI name of the
persistence units in the application server.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 18 Dec 2015 17:42:24 +0100 |
parents | 9d2070b84238 |
children | e797391714a0 |
line wrap: on
line source
#!/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 USAGE ON ALL SEQUENCES IN SCHEMA stammdaten, bund, land TO $ROLE_NAME; GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON ALL TABLES IN SCHEMA stammdaten, bund, land TO $ROLE_NAME;"