comparison flys-backend/doc/schema/postgresql.sql @ 3796:61195d14b844

FLYS backend: Fixed postgresql scheme. flys-backend/trunk@5445 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 12 Sep 2012 16:51:38 +0000
parents 3442304b430a
children 948c7289fc42
comparison
equal deleted inserted replaced
3795:f210432f4383 3796:61195d14b844
278 river_id int NOT NULL REFERENCES rivers(id), 278 river_id int NOT NULL REFERENCES rivers(id),
279 time_interval_id int REFERENCES time_intervals(id), 279 time_interval_id int REFERENCES time_intervals(id),
280 description VARCHAR(256) 280 description VARCHAR(256)
281 ); 281 );
282 282
283 -- Indices for faster access of the points
284 CREATE INDEX cross_section_lines_km_idx
285 ON cross_section_lines(km);
286 CREATE INDEX cross_section_points_line_idx
287 ON cross_section_points(cross_section_line_id);
288
289 CREATE SEQUENCE CROSS_SECTION_LINES_ID_SEQ; 283 CREATE SEQUENCE CROSS_SECTION_LINES_ID_SEQ;
290 284
291 CREATE TABLE cross_section_lines ( 285 CREATE TABLE cross_section_lines (
292 id int PRIMARY KEY NOT NULL, 286 id int PRIMARY KEY NOT NULL,
293 km NUMERIC NOT NULL, 287 km NUMERIC NOT NULL,
303 col_pos int NOT NULL, 297 col_pos int NOT NULL,
304 x NUMERIC NOT NULL, 298 x NUMERIC NOT NULL,
305 y NUMERIC NOT NULL, 299 y NUMERIC NOT NULL,
306 UNIQUE (cross_section_line_id, col_pos) 300 UNIQUE (cross_section_line_id, col_pos)
307 ); 301 );
302
303 -- Indices for faster access of the points
304 CREATE INDEX cross_section_lines_km_idx
305 ON cross_section_lines(km);
306 CREATE INDEX cross_section_points_line_idx
307 ON cross_section_points(cross_section_line_id);
308 308
309 -- Hydraulische Kenngroessen 309 -- Hydraulische Kenngroessen
310 310
311 CREATE SEQUENCE HYKS_ID_SEQ; 311 CREATE SEQUENCE HYKS_ID_SEQ;
312 312

http://dive4elements.wald.intevation.org