comparison flys-backend/ChangeLog @ 1210:31d8638760b1

New. The hibernate models for the HYK structures. flys-backend/trunk@2336 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 15 Jul 2011 11:12:14 +0000
parents c12b5fbd33e8
children f08fe480092c
comparison
equal deleted inserted replaced
1209:c12b5fbd33e8 1210:31d8638760b1
1 2011-07-15 Sascha L. Teichmann <sascha.teichmann@intevation.de>
2
3 * src/main/java/de/intevation/flys/model/HYKFormation.java,
4 src/main/java/de/intevation/flys/model/HYKEntry.java,
5 src/main/java/de/intevation/flys/model/HYKFlowZone.java,
6 src/main/java/de/intevation/flys/model/HYKFlowZoneType.java,
7 src/main/java/de/intevation/flys/model/HYK.java: New. The hibernate models
8 for the HYK structures.
9
10 * src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java:
11 Registered new models.
12
13 * src/main/java/de/intevation/flys/model/CrossSection.java: Added
14 'order by' annotation for fetching the cross section lines.
15
1 2011-07-15 Sascha L. Teichmann <sascha.teichmann@intevation.de> 16 2011-07-15 Sascha L. Teichmann <sascha.teichmann@intevation.de>
2 17
3 * doc/schema/postgresql.sql: Added structures for HYKs "Hydraulische Kenngroessen" 18 * doc/schema/postgresql.sql: Added structures for HYKs "Hydraulische Kenngroessen"
4 To update existing databases: 19 To update existing databases:
5 20
6 BEGIN; 21 BEGIN;
7 CREATE SEQUENCE HYKS_ID_SEQ; 22 CREATE SEQUENCE HYKS_ID_SEQ;
8
9 CREATE TABLE hyks ( 23 CREATE TABLE hyks (
10 id int PRIMARY KEY NOT NULL, 24 id int PRIMARY KEY NOT NULL,
11 river_id int NOT NULL, 25 river_id int NOT NULL,
12 description VARCHAR(256) NOT NULL 26 description VARCHAR(256) NOT NULL
13 ); 27 );
14 28
15 CREATE SEQUENCE HYK_ENTRIES_ID_SEQ; 29 CREATE SEQUENCE HYK_ENTRIES_ID_SEQ;
16
17 CREATE TABLE hyk_entries ( 30 CREATE TABLE hyk_entries (
18 id int PRIMARY KEY NOT NULL, 31 id int PRIMARY KEY NOT NULL,
19 hyk_id int NOT NULL REFERENCES hyks(id), 32 hyk_id int NOT NULL REFERENCES hyks(id),
20 km NUMERIC NOT NULL, 33 km NUMERIC NOT NULL,
21 UNIQUE (hyk_id, km) 34 UNIQUE (hyk_id, km)
22 ); 35 );
23 36
24 CREATE SEQUENCE HYK_FORMATIONS_ID_SEQ; 37 CREATE SEQUENCE HYK_FORMATIONS_ID_SEQ;
25
26 CREATE TABLE hyk_formations ( 38 CREATE TABLE hyk_formations (
27 id int PRIMARY KEY NOT NULL, 39 id int PRIMARY KEY NOT NULL,
28 formation_num int NOT NULL DEFAULT 0, 40 formation_num int NOT NULL DEFAULT 0,
29 hyk_entry_id int NOT NULL REFERENCES hyk_entries(id), 41 hyk_entry_id int NOT NULL REFERENCES hyk_entries(id),
30 top NUMERIC NOT NULL, 42 top NUMERIC NOT NULL,
31 bottom NUMERIC NOT NULL, 43 bottom NUMERIC NOT NULL,
32 UNIQUE (hyk_entry_id, formation_num) 44 UNIQUE (hyk_entry_id, formation_num)
33 ); 45 );
34 46
35 CREATE SEQUENCE HYK_FLOW_ZONE_TYPES_ID_SEQ; 47 CREATE SEQUENCE HYK_FLOW_ZONE_TYPES_ID_SEQ;
36
37 CREATE TABLE hyk_flow_zone_types ( 48 CREATE TABLE hyk_flow_zone_types (
38 id int PRIMARY KEY NOT NULL, 49 id int PRIMARY KEY NOT NULL,
39 name VARCHAR(50) NOT NULL UNIQUE, 50 name VARCHAR(50) NOT NULL UNIQUE,
40 description VARCHAR(256) 51 description VARCHAR(256)
41 ); 52 );
42 53
43 CREATE SEQUENCE HYK_FLOW_ZONES_ID_SEQ; 54 CREATE SEQUENCE HYK_FLOW_ZONES_ID_SEQ;
44
45 CREATE TABLE hyk_flow_zones ( 55 CREATE TABLE hyk_flow_zones (
46 id int PRIMARY KEY NOT NULL, 56 id int PRIMARY KEY NOT NULL,
47 formation_id int NOT NULL REFERENCES hyk_formations(id), 57 formation_id int NOT NULL REFERENCES hyk_formations(id),
48 type_id int NOT NULL REFERENCES hyk_flow_zone_types(id), 58 type_id int NOT NULL REFERENCES hyk_flow_zone_types(id),
49 a NUMERIC NOT NULL, 59 a NUMERIC NOT NULL,

http://dive4elements.wald.intevation.org