source: TI01-discovery/branches/ingestAutomation-upgrade/database/spatial_temporal_data.sql @ 3849

Subversion URL:
Revision 3849, 595 bytes checked in by cbyrom, 12 years ago (diff)

Adjust tables to use timestamps instead of dates - and add create dates to
the spatiotemporal tables + add delete cascade to the spatial_temporal_data
to allow easy removal of spatial and temporal records.

2 * Table to relate spatial and temporal data to each other and to a particular ingested document
3 *
4 * C Byrom Apr 08
5 *
6 */
7DROP TABLE spatial_temporal_data CASCADE;
8CREATE TABLE spatial_temporal_data
10        spatial_temporal_data_id SERIAL PRIMARY KEY,
11        original_record_id      int references original_document(original_document_id),
12        spatial_data_id         int references spatial_data(spatial_data_id) ON DELETE CASCADE,
13        temporal_data_id        int references temporal_data(temporal_data_id) ON DELETE CASCADE,
14        create_date     timestamp
16--ALTER TABLE spatial_temporal_data OWNER TO postgres;
Note: See TracBrowser for help on using the repository browser.