Mercurial > dive4elements > river
comparison flys-backend/ChangeLog @ 1203:3c01bef43a98
Querprofile: Added a table to map the points to a given km.
flys-backend/trunk@2308 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 07 Jul 2011 15:59:24 +0000 |
parents | 44581b40b968 |
children | 22858e7cca79 |
comparison
equal
deleted
inserted
replaced
1202:44581b40b968 | 1203:3c01bef43a98 |
---|---|
1 2011-07-07 Sascha L. Teichmann <sascha.teichmann@intevation.de> | 1 2011-07-07 Sascha L. Teichmann <sascha.teichmann@intevation.de> |
2 | 2 |
3 * doc/schema/postgresql.sql: Introduced a new table cross_section_line | |
4 holding the km of a set of points. | |
5 | |
6 * src/main/java/de/intevation/flys/model/CrossSectionLine.java: | |
7 New. Model for a single line of a "Querprofil". | |
8 | |
9 * src/main/java/de/intevation/flys/model/CrossSection.java: Removed | |
10 'km' and 'points' they are part of the line now. | |
11 | |
12 * src/main/java/de/intevation/flys/model/CrossSectionPoint.java: | |
13 They reference to the containing line now. | |
14 | |
15 * src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java: | |
16 Registered new model. | |
17 | |
18 To update existing databases: | |
19 BEGIN; | |
20 DROP SEQUENCE CROSS_SECTIONS_ID_SEQ; | |
21 DROP SEQUENCE CROSS_SECTION_POINTS_ID_SEQ; | |
22 DROP TABLE cross_section_points; | |
23 DROP TABLE cross_sections; | |
24 CREATE SEQUENCE CROSS_SECTIONS_ID_SEQ; | |
25 CREATE TABLE cross_sections ( | |
26 id int PRIMARY KEY NOT NULL, | |
27 river_id int NOT NULL REFERENCES rivers(id), | |
28 time_interval_id int REFERENCES time_intervals(id), | |
29 description VARCHAR(256) | |
30 ); | |
31 CREATE SEQUENCE CROSS_SECTION_LINES_SEQ; | |
32 CREATE TABLE cross_section_lines ( | |
33 id int PRIMARY KEY NOT NULL, | |
34 km NUMERIC NOT NULL, | |
35 cross_section_id int NOT NULL REFERENCES cross_sections(id), | |
36 UNIQUE (km, cross_section_id) | |
37 ); | |
38 CREATE SEQUENCE CROSS_SECTION_POINTS_ID_SEQ; | |
39 CREATE TABLE cross_section_points ( | |
40 id int PRIMARY KEY NOT NULL, | |
41 cross_section_line_id int NOT NULL REFERENCES cross_section_lines(id), | |
42 col_pos int NOT NULL, | |
43 x NUMERIC NOT NULL, | |
44 y NUMERIC NOT NULL, | |
45 UNIQUE (cross_section_line_id, col_pos) | |
46 ); | |
47 COMMIT; | |
48 | |
49 2011-07-07 Sascha L. Teichmann <sascha.teichmann@intevation.de> | |
50 | |
3 * doc/schema/postgresql.sql: Dropped constraint that enforces the | 51 * doc/schema/postgresql.sql: Dropped constraint that enforces the |
4 uniquness of km and river. This is violated because there are | 52 uniqueness of km and river. This is violated because there are |
5 more than one sounding in different year at the same km of a river. | 53 more than one sounding in different year at the same km of a river. |
6 Added column 'description' to the cross section table to make it | 54 Added column 'description' to the cross section table to make it |
7 human readable. | 55 human readable. |
8 | 56 |
9 To update existing databases: | 57 To update existing databases: |
15 Added the description column to the Hibernate model. | 63 Added the description column to the Hibernate model. |
16 | 64 |
17 2011-07-07 Sascha L. Teichmann <sascha.teichmann@intevation.de> | 65 2011-07-07 Sascha L. Teichmann <sascha.teichmann@intevation.de> |
18 | 66 |
19 * doc/schema/postgresql.sql: Dropped constraint that enforces the | 67 * doc/schema/postgresql.sql: Dropped constraint that enforces the |
20 uniquness of x in a "Querprofil-Spur". There are vertical lines | 68 uniqueness of x in a "Querprofil-Spur". There are vertical lines |
21 in the soundings so this constraint is violated. | 69 in the soundings so this constraint is violated. |
22 | 70 |
23 To update existing databases: | 71 To update existing databases: |
24 | 72 |
25 ALTER TABLE cross_section_points DROP CONSTRAINT cross_section_points_cross_section_id_key2; | 73 ALTER TABLE cross_section_points DROP CONSTRAINT cross_section_points_cross_section_id_key2; |