source: TI01-discovery/branches/ingestAutomation-upgrade/database/create_database.sh @ 3834

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/branches/ingestAutomation-upgrade/database/create_database.sh@3834
Revision 3834, 403 bytes checked in by cbyrom, 12 years ago (diff)

Changes to data model:
i) Simplify creation script - to take input parameters and reuse these in a env variable
ii) Create history table direct from the main table
iii) Create procedure to do the backup to the history table
iv) Add trigger to call the backup procedure
v) Tidy up of spatio + temporal tables + additional docs.

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3if [ $# -ne 3 ]
4then
5         echo 1>&2 Usage: $0 username database hostname
6         exit 127
7fi
8
9dbOptions="-U $1 -d $2 -h $3"
10echo $dbOptions
11
12psql -f ingest_procedures.sql $dbOptions
13psql -f original_document.sql $dbOptions
14psql -f transformed_document.sql $dbOptions
15psql -f spatial_data.sql $dbOptions
16psql -f temporal_data.sql $dbOptions
17psql -f spatial_temporal_data.sql $dbOptions
Note: See TracBrowser for help on using the repository browser.