Mercurial > gemma
comparison schema/install-db.sh @ 4618:0f2c3cb139cc geoserver_sql_views
Merge default into geoserver_sql_views
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 20 Sep 2019 15:35:16 +0200 |
parents | b605e91f08f0 a554d7ca26ee |
children | c6d986789253 |
comparison
equal
deleted
inserted
replaced
4617:ae840f9eb4c8 | 4618:0f2c3cb139cc |
---|---|
3 # without warranty, see README.md and license for details. | 3 # without warranty, see README.md and license for details. |
4 # | 4 # |
5 # SPDX-License-Identifier: AGPL-3.0-or-later | 5 # SPDX-License-Identifier: AGPL-3.0-or-later |
6 # License-Filename: LICENSES/AGPL-3.0.txt | 6 # License-Filename: LICENSES/AGPL-3.0.txt |
7 # | 7 # |
8 # Copyright (C) 2018 by via donau | 8 # Copyright (C) 2018, 2019 by via donau |
9 # – Österreichische Wasserstraßen-Gesellschaft mbH | 9 # – Österreichische Wasserstraßen-Gesellschaft mbH |
10 # Software engineering by Intevation GmbH | 10 # Software engineering by Intevation GmbH |
11 # | 11 # |
12 # Author(s): | 12 # Author(s): |
13 # * Sascha Wilde <wilde@intevation.de> | 13 # * Sascha Wilde <wilde@intevation.de> |
119 # Main ------------------------------------------------------------ | 119 # Main ------------------------------------------------------------ |
120 | 120 |
121 if [[ drop -eq 0 ]] ; then | 121 if [[ drop -eq 0 ]] ; then |
122 # Default operation: create schema | 122 # Default operation: create schema |
123 createdb -p "$port" "$db" | 123 createdb -p "$port" "$db" |
124 psql -q -p "$port" -f "$BASEDIR/roles.sql" -d "$db" | |
125 psql -qtv ON_ERROR_STOP= -p "$port" -d "$db" \ | 124 psql -qtv ON_ERROR_STOP= -p "$port" -d "$db" \ |
126 -c "SET client_min_messages TO WARNING;" \ | 125 -c "SET client_min_messages TO WARNING;" \ |
126 -f "$BASEDIR/roles.sql" \ | |
127 -f "$BASEDIR/isrs.sql" \ | 127 -f "$BASEDIR/isrs.sql" \ |
128 -f "$BASEDIR/gemma.sql" \ | 128 -f "$BASEDIR/gemma.sql" \ |
129 -f "$BASEDIR/geo_functions.sql" \ | 129 -f "$BASEDIR/geo_functions.sql" \ |
130 -f "$BASEDIR/search_functions.sql" \ | 130 -f "$BASEDIR/search_functions.sql" \ |
131 -f "$BASEDIR/geonames.sql" \ | 131 -f "$BASEDIR/geonames.sql" \ |
132 -f "$BASEDIR/manage_users.sql" \ | 132 -f "$BASEDIR/manage_users.sql" \ |
133 -f "$BASEDIR/auth.sql" \ | 133 -f "$BASEDIR/auth.sql" \ |
134 -f "$BASEDIR/isrs_functions.sql" \ | 134 -f "$BASEDIR/isrs_functions.sql" \ |
135 -f "$BASEDIR/default_sysconfig.sql" \ | 135 -f "$BASEDIR/default_sysconfig.sql" \ |
136 -f "$BASEDIR/countries.sql" \ | |
136 -f "$BASEDIR/version.sql" | 137 -f "$BASEDIR/version.sql" |
137 | 138 |
138 # setup initial login roles with given passwords: | 139 # setup initial login roles with given passwords: |
139 psql -qt -P pager=off -p "$port" -d "$db" \ | 140 psql -qt -P pager=off -p "$port" -d "$db" \ |
140 -v adminpw="$adminpw" -v metapw="$metapw" \ | 141 -v ON_ERROR_STOP= -v adminpw="$adminpw" -v metapw="$metapw" \ |
141 -f "$BASEDIR/std_login_roles.sql" | 142 -f "$BASEDIR/std_login_roles.sql" |
142 | 143 |
143 if [[ $demo -eq 1 ]] ; then | 144 if [[ $demo -eq 1 ]] ; then |
144 psql -qv ON_ERROR_STOP= -p "$port" -d "$db" \ | 145 psql -qv ON_ERROR_STOP= -p "$port" -d "$db" \ |
145 -f "$BASEDIR/demo-data/responsibility_areas.sql" \ | |
146 -f "$BASEDIR/demo-data/users.sql" \ | 146 -f "$BASEDIR/demo-data/users.sql" \ |
147 -f "$BASEDIR/demo-data/published_services.sql" \ | 147 -f "$BASEDIR/demo-data/stretches.sql" |
148 -f "$BASEDIR/demo-data/fake_stretches.sql" | |
149 psql -q -p "$port" -f "$BASEDIR/demo-data/roles.sql" \ | 148 psql -q -p "$port" -f "$BASEDIR/demo-data/roles.sql" \ |
150 -d "$db" | 149 -d "$db" |
151 fi | 150 fi |
152 | 151 |
153 if [[ $geonames -eq 1 ]] ; then | 152 if [[ $geonames -eq 1 ]] ; then |