Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/branches/ingestAutomation-upgrade/database/spatial_temporal_data.sql@3863
Revision 3863,
597 bytes
checked in by cbyrom, 13 years ago
(diff) |
Add new stored proc to cleanly delete an ingested document and all
its associated data.
|
Line | |
---|
1 | /* |
---|
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 | */ |
---|
7 | DROP TABLE spatial_temporal_data CASCADE; |
---|
8 | CREATE TABLE spatial_temporal_data |
---|
9 | ( |
---|
10 | spatial_temporal_data_id SERIAL PRIMARY KEY, |
---|
11 | original_document_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 |
---|
15 | ); |
---|
16 | --ALTER TABLE spatial_temporal_data OWNER TO postgres; |
---|
Note: See
TracBrowser
for help on using the repository browser.