Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/branches/ingestAutomation-upgrade/database/spatial_data.sql@3849
Revision 3849,
439 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.
|
Line | |
---|
1 | /* |
---|
2 | * Table storing spatial information |
---|
3 | * |
---|
4 | * C Byrom Apr 08 |
---|
5 | * |
---|
6 | */ |
---|
7 | DROP TABLE spatial_data CASCADE; |
---|
8 | CREATE TABLE spatial_data |
---|
9 | ( |
---|
10 | spatial_data_id SERIAL primary key, |
---|
11 | description character varying (255), |
---|
12 | create_date timestamp |
---|
13 | ); |
---|
14 | --ALTER TABLE spatial_data OWNER TO postgres; |
---|
15 | |
---|
16 | -- add 2D geometry column, 'geometry', to table - with SRS val of 4326 |
---|
17 | select addgeometrycolumn('spatial_data','geometry',4326,'GEOMETRY',2); |
---|
Note: See
TracBrowser
for help on using the repository browser.