comparison flys-backend/ChangeLog @ 1192:5f8444df19e4

Add relations for cross sections. flys-backend/trunk@2287 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 06 Jul 2011 10:23:45 +0000
parents 1557cccb88f6
children 1e3979e07b9e
comparison
equal deleted inserted replaced
1191:1557cccb88f6 1192:5f8444df19e4
1 2011-07-06 Sascha L. Teichmann <sascha.teichmann@intevation.de>
2
3 * doc/schema/postgresql.sql: Add relations for cross sections.
4 To update existing databases:
5 BEGIN;
6
7 CREATE SEQUENCE CROSS_SECTIONS_ID_SEQ;
8 CREATE TABLE cross_sections (
9 id int PRIMARY KEY NOT NULL,
10 km NUMERIC NOT NULL,
11 river_id int NOT NULL REFERENCES rivers(id),
12 time_interval_id int REFERENCES time_intervals(id),
13 UNIQUE (km, river_id)
14 );
15
16 CREATE SEQUENCE POINTS3D_ID_SEQ;
17 CREATE TABLE points3d (
18 id int PRIMARY KEY NOT NULL,
19 x NUMERIC NOT NULL,
20 y NUMERIC NOT NULL,
21 z NUMERIC NOT NULL
22 );
23
24 CREATE SEQUENCE CROSS_SECTION_POINTS_ID_SEQ;
25 CREATE TABLE cross_section_points (
26 id int PRIMARY KEY NOT NULL,
27 cross_section_id int NOT NULL REFERENCES cross_sections(id),
28 point3d_id int NOT NULL REFERENCES points3d(id),
29 col_pos int NOT NULL,
30 UNIQUE (cross_section_id, point3d_id, col_pos),
31 UNIQUE (cross_section_id, col_pos)
32 );
33
34 COMMIT;
35
1 2011-06-28 Ingo Weinzierl <ingo@intevation.de> 36 2011-06-28 Ingo Weinzierl <ingo@intevation.de>
2 37
3 Tagged RELEASE 2.4 38 Tagged RELEASE 2.4
4 39
5 2011-06-27 Ingo Weinzierl <ingo@intevation.de> 40 2011-06-27 Ingo Weinzierl <ingo@intevation.de>

http://dive4elements.wald.intevation.org