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, 11 years ago
(diff) |
Adding files from v4.2.0 tag to form basis for v4.3.0 version
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | if [ $# -lt 2 ] |
---|
4 | then |
---|
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 |
---|
9 | fi |
---|
10 | |
---|
11 | port="5432" |
---|
12 | if [ $# -gt 3 ] |
---|
13 | then |
---|
14 | port=$4 |
---|
15 | fi |
---|
16 | |
---|
17 | host="localhost" |
---|
18 | if [ $# -gt 2 ] |
---|
19 | then |
---|
20 | host=$3 |
---|
21 | fi |
---|
22 | |
---|
23 | dbOptions="-U $1 -d $2 -h $host -p $port" |
---|
24 | echo $dbOptions |
---|
25 | |
---|
26 | psql -f ingest_procedures_MEDIN.sql $dbOptions |
---|
27 | psql -f original_document.sql $dbOptions |
---|
28 | psql -f transformed_document.sql $dbOptions |
---|
29 | psql -f spatial_data_MEDIN.sql $dbOptions |
---|
30 | psql -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.