Ignore:
Timestamp:
01/05/08 13:56:05 (12 years ago)
Author:
cbyrom
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/branches/ingestAutomation-upgrade/database/create_database.sh

    r3831 r3834  
    1 # set up postgres path first 
    2 psql -f original_document.sql -U postgres -d test 
    3 psql -f transformed_document.sql -U postgres -d test 
    4 psql -f spatial_data.sql -U postgres -d test 
    5 psql -f temporal_data.sql -U postgres -d test 
    6 psql -f spatial_temporal_data.sql -U postgres -d test 
     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 TracChangeset for help on using the changeset viewer.