comparison 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
comparison
equal deleted inserted replaced
79:85957628f4c0 80:5c093612ce89
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
9 psql $DB_NAME <<- EOSQL
10 CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
11 EOSQL
12 echo "Set extensions on $DB_NAME"
13 fi
14