comparison flys-backend/ChangeLog @ 471:3570e4af8cb2

Added 'position' column to wst_columns to allow order them by there column position in the original wst file. flys-backend/trunk@1710 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 15 Apr 2011 16:06:15 +0000
parents f4afea9b7537
children 1e196c75563b
comparison
equal deleted inserted replaced
470:f4afea9b7537 471:3570e4af8cb2
1 2011-04-15 Sascha L. Teichmann <sascha.teichmann@intevation.de>
2
3 * doc/schema/postgresql.sql: Added 'position' column to wst_columns
4 to allow order them by there column position in the original
5 wst file.
6
7 Update existing database with:
8
9 BEGIN;
10 ALTER TABLE wst_columns ADD COLUMN position int;
11 UPDATE wst_columns w SET
12 position = id - (SELECT min(id) FROM wst_columns WHERE wst_id = w.wst_id);
13 ALTER TABLE wst_columns ADD CONSTRAINT wst_columns_wst_id_position_key
14 UNIQUE (wst_id, position);
15 COMMIT;
16
17 * src/main/java/de/intevation/flys/model/Wst.java,
18 src/main/java/de/intevation/flys/model/WstColumn.java:
19 Adjusted models.
20
21 * src/main/java/de/intevation/flys/importer/ImportWst.java,
22 src/main/java/de/intevation/flys/importer/ImportWstColumn.java:
23 Adjusted importer.
24
1 2011-04-15 Sascha L. Teichmann <sascha.teichmann@intevation.de> 25 2011-04-15 Sascha L. Teichmann <sascha.teichmann@intevation.de>
2 26
3 * doc/schema/postgresql.sql: Forget ',' in schema. 27 * doc/schema/postgresql.sql: Forget ',' in schema.
4 28
5 2011-04-15 Sascha L. Teichmann <sascha.teichmann@intevation.de> 29 2011-04-15 Sascha L. Teichmann <sascha.teichmann@intevation.de>

http://dive4elements.wald.intevation.org