source: TI01-discovery-Ingest/trunk/v4.3.0/ingestAutomation-upgrade/database/create_database_MEDIN.sh @ 7185

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery-Ingest/trunk/v4.3.0/ingestAutomation-upgrade/database/create_database_MEDIN.sh@7185
Revision 7185, 922 bytes checked in by sdonegan, 9 years ago (diff)

Adding files from v4.2.0 tag to form basis for v4.3.0 version

RevLine 
[7185]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 ingest_procedures_MEDIN.sql $dbOptions
27psql -f original_document.sql $dbOptions
28psql -f transformed_document.sql $dbOptions
29psql -f spatial_data_MEDIN.sql $dbOptions
30psql -f temporal_data_MEDIN.sql $dbOptions
31
32#For MEDIN upgrades connecting spatial and temporal tables direct to original_document without intermediate spatial_temporal_data table
33#psql -f spatial_temporal_data.sql $dbOptions #
34
35# - the following loads some test data into the system - useful for testing in absence of ingestible datasets
36#psql -f test_data.sql $dbOptions
Note: See TracBrowser for help on using the repository browser.