source: TI01-discovery-Ingest/trunk/v4.3.0/ingestAutomation-upgrade/ingestLoggingDatabase/create_database.sh @ 7241

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery-Ingest/trunk/v4.3.0/ingestAutomation-upgrade/ingestLoggingDatabase/create_database.sh@7241
Revision 7241, 626 bytes checked in by mnagni, 11 years ago (diff)

New tables for the service

Line 
1#!/bin/bash
2
3if [ $# -lt 2 ]
4then
5         echo 1>&2 Usage: $0 username database [hostname] [port]
6         echo 1>&2 - hostname defaults to 'localhost'
7         echo 1>&2 - port defaults to 5432
8         exit 127
9fi
10
11port="5432"
12if [ $# -gt 3 ]
13then
14        port=$4
15fi
16
17host="localhost"
18if [ $# -gt 2 ]
19then
20        host=$3
21fi
22
23dbOptions="-U $1 -d $2 -h $host -p $port"
24echo $dbOptions
25
26psql -f IngestLoggingTable.sql $dbOptions
27psql -f HarvestLog.sql $dbOptions
28psql -f HarvestType.sql $dbOptions
29psql -f formatTable.sql $dbOptions
30psql -f OAIProvider.sql $dbOptions
31psql -f provider.sql $dbOptions
32psql -f service_config.sql $dbOptions
33
Note: See TracBrowser for help on using the repository browser.