source: TI01-discovery/branches/ingestAutomation-upgrade/database/temporal_data.sql @ 3834

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/branches/ingestAutomation-upgrade/database/temporal_data.sql@3834
Revision 3834, 314 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.

Line 
1/*
2 * Table storing temporal information
3 *
4 * C Byrom Apr 08
5 *
6 */
7DROP TABLE temporal_data CASCADE;
8CREATE TABLE temporal_data
9(
10        temporal_data_id SERIAL primary key,
11        start_time timestamp without time zone,
12        end_time timestamp without time zone
13);
14ALTER TABLE temporal_data OWNER TO postgres;
Note: See TracBrowser for help on using the repository browser.