comparison flys-backend/doc/schema/postgresql-spatial.sql @ 5210:908848b74d7e

SCHEME CHANGE: dgm now uses time intervals and ranges
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 08 Mar 2013 18:15:48 +0100
parents 8aac391871f9
children b46df0609276
comparison
equal deleted inserted replaced
5209:850237ae9544 5210:908848b74d7e
93 CREATE SEQUENCE DEM_ID_SEQ; 93 CREATE SEQUENCE DEM_ID_SEQ;
94 CREATE TABLE dem ( 94 CREATE TABLE dem (
95 id int PRIMARY KEY NOT NULL, 95 id int PRIMARY KEY NOT NULL,
96 river_id int REFERENCES rivers(id) ON DELETE CASCADE, 96 river_id int REFERENCES rivers(id) ON DELETE CASCADE,
97 -- XXX Should we use the ranges table instead? 97 -- XXX Should we use the ranges table instead?
98 name VARCHAR(64), 98 name VARCHAR(64),
99 lower FLOAT8, 99 range_id INT REFERENCES ranges(id);
100 upper FLOAT8, 100 time_interval_id INT REFERENCES time_intervals(id);
101 year_from VARCHAR(32), 101 projection VARCHAR(32),
102 year_to VARCHAR(32), 102 srid int NOT NULL,
103 projection VARCHAR(32), 103 elevation_state VARCHAR(32),
104 srid int NOT NULL, 104 format VARCHAR(32),
105 elevation_state VARCHAR(32), 105 border_break BOOLEAN NOT NULL DEFAULT FALSE,
106 format VARCHAR(32), 106 resolution VARCHAR(16),
107 border_break BOOLEAN NOT NULL DEFAULT FALSE, 107 description VARCHAR(256),
108 resolution VARCHAR(16), 108 path VARCHAR(256) NOT NULL UNIQUE
109 description VARCHAR(256),
110 path VARCHAR(256) NOT NULL UNIQUE
111 ); 109 );
112 ALTER TABLE dem ALTER COLUMN id SET DEFAULT NEXTVAL('DEM_ID_SEQ'); 110 ALTER TABLE dem ALTER COLUMN id SET DEFAULT NEXTVAL('DEM_ID_SEQ');
113 111
114 112
115 -- Static lookup tables for Hochwasserschutzanlagen 113 -- Static lookup tables for Hochwasserschutzanlagen

http://dive4elements.wald.intevation.org