annotate postgres/setupExtensions.sh @ 80:5c093612ce89
DEP-10: add uuid extension to database
author |
smith@nwoca.org |
date |
Fri, 08 Apr 2016 21:40:03 +0100 |
parents |
postgres/setupDatabase.sh@0cdc167e6319 |
children |
53671513b240 |
rev |
line source |
3
|
1 #!/bin/bash
|
|
2
|
|
3 export PGUSER=postgres
|
|
4 TEST=`psql <<- EOSQL
|
|
5 SELECT 1 FROM pg_database WHERE datname='$DB_NAME';
|
|
6 EOSQL`
|
|
7
|
|
8 if [[ $TEST == "1" ]]; then
|
80
|
9 psql $DB_NAME <<- EOSQL
|
|
10 CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
3
|
11 EOSQL
|
80
|
12 echo "Set extensions on $DB_NAME"
|
3
|
13 fi
|
|
14
|