Mercurial > public > ssdt-docker
comparison postgres/setupExtensions.sh @ 90:63cb9be89a26 production v1.0.0
flow: Merged <release> 'v1.0.0' to <master> ('production').
author | smith@nwoca.org |
---|---|
date | Thu, 22 Sep 2016 01:49:20 +0100 |
parents | 53671513b240 |
children |
comparison
equal
deleted
inserted
replaced
1:44f401c902ba | 90:63cb9be89a26 |
---|---|
1 #!/bin/bash | |
2 | |
3 export PGUSER=postgres | |
4 result=`psql -t -A <<- EOSQL | |
5 SELECT 1 FROM pg_database WHERE datname='$DB_NAME'; | |
6 EOSQL` | |
7 | |
8 echo "Checking extensions on $DB_NAME ( $result )" | |
9 if [[ $result == "1" ]]; then | |
10 psql $DB_NAME <<- EOSQL | |
11 CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | |
12 EOSQL | |
13 echo "Set extensions on $DB_NAME" | |
14 fi | |
15 |