Mercurial > public > ssdt-docker
annotate postgres/setupExtensions.sh @ 413:4b0c2c7e213b production v2.15.0
flow: Merged <release> '2.15.0' to <master> ('production').
author | Marc Davis <marc.davis@mcoecn.org> |
---|---|
date | Fri, 14 Oct 2022 10:20:38 -0400 |
parents | 53671513b240 |
children |
rev | line source |
---|---|
3 | 1 #!/bin/bash |
2 | |
3 export PGUSER=postgres | |
81
53671513b240
DEP-10: add timezone and locale settings. add java base image. add native APR for tomcat
smith@nwoca.org
parents:
80
diff
changeset
|
4 result=`psql -t -A <<- EOSQL |
3 | 5 SELECT 1 FROM pg_database WHERE datname='$DB_NAME'; |
6 EOSQL` | |
7 | |
81
53671513b240
DEP-10: add timezone and locale settings. add java base image. add native APR for tomcat
smith@nwoca.org
parents:
80
diff
changeset
|
8 echo "Checking extensions on $DB_NAME ( $result )" |
53671513b240
DEP-10: add timezone and locale settings. add java base image. add native APR for tomcat
smith@nwoca.org
parents:
80
diff
changeset
|
9 if [[ $result == "1" ]]; then |
80 | 10 psql $DB_NAME <<- EOSQL |
11 CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | |
3 | 12 EOSQL |
80 | 13 echo "Set extensions on $DB_NAME" |
3 | 14 fi |
15 |