Project

General

Profile

« Previous | Next » 

Revision 37

xml2db: Improved empty_db to use TRUNCATE instead of DROP DATABASE. Added xml2vegbank to automatically set db env vars.

View differences:

empty_db
2 2
# Resets vegbank db
3 3

  
4 4
selfDir="$(dirname -- "$0")"
5
cd "$selfDir"
6 5

  
7
sudo -u postgres psql <vegbank.sql
6
export PGHOST=localhost PGUSER=vegbank PGPASSWORD=vegbank \
7
PGOPTIONS='--client-min-messages=WARNING'
8

  
9
psql --quiet --dbname=vegbank <"$selfDir/vegbank_reset.sql"

Also available in: Unified diff