diff 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
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Fri Apr 15 15:28:35 2011 +0000
+++ b/flys-backend/ChangeLog	Fri Apr 15 16:06:15 2011 +0000
@@ -1,3 +1,27 @@
+2011-04-15	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* doc/schema/postgresql.sql: Added 'position' column to wst_columns
+	  to allow order them by there column position in the original
+	  wst file.
+	
+	  Update existing database with:
+
+	    BEGIN;
+	      ALTER TABLE wst_columns ADD COLUMN position int;
+	      UPDATE wst_columns w SET 
+	        position = id - (SELECT min(id) FROM wst_columns WHERE wst_id = w.wst_id);
+	      ALTER TABLE wst_columns ADD CONSTRAINT wst_columns_wst_id_position_key
+	        UNIQUE (wst_id, position);
+	    COMMIT;
+
+	* src/main/java/de/intevation/flys/model/Wst.java,
+	  src/main/java/de/intevation/flys/model/WstColumn.java:
+	  Adjusted models.
+
+	* src/main/java/de/intevation/flys/importer/ImportWst.java,
+	  src/main/java/de/intevation/flys/importer/ImportWstColumn.java:
+	  Adjusted importer.
+
 2011-04-15	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* doc/schema/postgresql.sql: Forget ',' in schema.

http://dive4elements.wald.intevation.org