comparison flys-backend/doc/schema/postgresql.sql @ 1195:2b4de678e29a

Removed braindead points3d table flys-backend/trunk@2295 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 06 Jul 2011 15:35:38 +0000
parents 5f8444df19e4
children 4e1b475a8cba
comparison
equal deleted inserted replaced
1194:491892931761 1195:2b4de678e29a
270 river_id int NOT NULL REFERENCES rivers(id), 270 river_id int NOT NULL REFERENCES rivers(id),
271 time_interval_id int REFERENCES time_intervals(id), 271 time_interval_id int REFERENCES time_intervals(id),
272 UNIQUE (km, river_id) -- XXX: Maybe too hard? 272 UNIQUE (km, river_id) -- XXX: Maybe too hard?
273 ); 273 );
274 274
275 -- TODO: Use a geometry column in cross_section_points
276
277 CREATE SEQUENCE POINTS3D_ID_SEQ;
278
279 CREATE TABLE points3d (
280 id int PRIMARY KEY NOT NULL,
281 x NUMERIC NOT NULL,
282 y NUMERIC NOT NULL,
283 z NUMERIC NOT NULL
284 );
285
286 CREATE SEQUENCE CROSS_SECTION_POINTS_ID_SEQ; 275 CREATE SEQUENCE CROSS_SECTION_POINTS_ID_SEQ;
287 276
288 CREATE TABLE cross_section_points ( 277 CREATE TABLE cross_section_points (
289 id int PRIMARY KEY NOT NULL, 278 id int PRIMARY KEY NOT NULL,
290 cross_section_id int NOT NULL REFERENCES cross_sections(id), 279 cross_section_id int NOT NULL REFERENCES cross_sections(id),
291 point3d_id int NOT NULL REFERENCES points3d(id),
292 col_pos int NOT NULL, 280 col_pos int NOT NULL,
293 UNIQUE (cross_section_id, point3d_id, col_pos), 281 x NUMERIC NOT NULL,
282 y NUMERIC NOT NULL
283 UNIQUE (cross_section_id, x),
294 UNIQUE (cross_section_id, col_pos) 284 UNIQUE (cross_section_id, col_pos)
295 ); 285 );
296 286
297 COMMIT; 287 COMMIT;

http://dive4elements.wald.intevation.org