comparison flys-backend/ChangeLog @ 477:0addc2663a4d

Forgot to add db update to changelog flys-backend/trunk@1725 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 18 Apr 2011 17:01:00 +0000
parents 77f337650211
children db430bd9e0e0
comparison
equal deleted inserted replaced
476:77f337650211 477:0addc2663a4d
1 2011-04-18 Sascha L. Teichmann <sascha.teichmann@intevation.de> 1 2011-04-18 Sascha L. Teichmann <sascha.teichmann@intevation.de>
2 2
3 * doc/schema/postgresql.sql, doc/schema/postgresql-cleanup.sql: 3 * doc/schema/postgresql.sql, doc/schema/postgresql-cleanup.sql:
4 Added a view 'wst_value_table' which aggregates the data 4 Added a view 'wst_value_table' which aggregates the data
5 to build w/q value tables. 5 to build w/q value tables.
6
7 To update existing databases:
8
9 BEGIN;
10 CREATE VIEW wst_value_table AS
11 SELECT wcv.position AS position,
12 w,
13 (SELECT q
14 FROM wst_column_q_ranges wcqr
15 JOIN wst_q_ranges wqr
16 ON wcqr.wst_q_range_id = wqr.id
17 JOIN ranges r
18 ON r.id = wqr.range_id
19 WHERE wcqr.wst_column_id = wc.id
20 AND wcv.position BETWEEN r.a AND r.b) AS q,
21 wc.position AS column_pos,
22 w.id AS wst_id
23 FROM wst_column_values wcv
24 JOIN wst_columns wc
25 ON wcv.wst_column_id = wc.id
26 JOIN wsts w
27 ON wc.wst_id = w.id
28 ORDER BY wcv.position ASC,
29 wc.position DESC;
30 COMMIT;
6 31
7 2011-04-18 Sascha L. Teichmann <sascha.teichmann@intevation.de> 32 2011-04-18 Sascha L. Teichmann <sascha.teichmann@intevation.de>
8 33
9 * src/main/java/de/intevation/flys/model/Wst.java: 34 * src/main/java/de/intevation/flys/model/Wst.java:
10 Add forgotten one to many relation Wst -> WstColumn. 35 Add forgotten one to many relation Wst -> WstColumn.

http://dive4elements.wald.intevation.org