comparison flys-backend/doc/schema/postgresql-spatial.sql @ 5121:e4cc9aebfcf1 dami

sensible constraints for dem-table
author Tom Gottfried <tom@intevation.de>
date Wed, 27 Feb 2013 19:44:08 +0100
parents 2837b11cdb13
children 04eb62eae722
comparison
equal deleted inserted replaced
5120:d49b3baa30d0 5121:e4cc9aebfcf1
88 river_id int REFERENCES rivers(id) ON DELETE CASCADE, 88 river_id int REFERENCES rivers(id) ON DELETE CASCADE,
89 -- XXX Should we use the ranges table instead? 89 -- XXX Should we use the ranges table instead?
90 name VARCHAR(64), 90 name VARCHAR(64),
91 lower FLOAT8, 91 lower FLOAT8,
92 upper FLOAT8, 92 upper FLOAT8,
93 year_from VARCHAR(32) NOT NULL, 93 year_from VARCHAR(32),
94 year_to VARCHAR(32) NOT NULL, 94 year_to VARCHAR(32),
95 projection VARCHAR(32) NOT NULL, 95 projection VARCHAR(32),
96 srid int NOT NULL, 96 srid int NOT NULL,
97 elevation_state VARCHAR(32), 97 elevation_state VARCHAR(32),
98 format VARCHAR(32), 98 format VARCHAR(32),
99 border_break BOOLEAN NOT NULL DEFAULT FALSE, 99 border_break BOOLEAN NOT NULL DEFAULT FALSE,
100 resolution VARCHAR(16), 100 resolution VARCHAR(16),
101 description VARCHAR(256), 101 description VARCHAR(256),
102 path VARCHAR(256) 102 path VARCHAR(256) NOT NULL
103 ); 103 );
104 ALTER TABLE dem ALTER COLUMN id SET DEFAULT NEXTVAL('DEM_ID_SEQ'); 104 ALTER TABLE dem ALTER COLUMN id SET DEFAULT NEXTVAL('DEM_ID_SEQ');
105 105
106 106
107 -- Static lookup tables for Hochwasserschutzanlagen 107 -- Static lookup tables for Hochwasserschutzanlagen

http://dive4elements.wald.intevation.org