Mercurial > gemma
changeset 736:34ea9d5df653
Fixed problem with unique constraint for countour lines.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 24 Sep 2018 11:24:42 +0200 |
parents | 83a9f04f1759 |
children | ea0eb6ef98ce |
files | cmd/octree2contour/store.go schema/gemma.sql |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cmd/octree2contour/store.go Mon Sep 24 10:58:34 2018 +0200 +++ b/cmd/octree2contour/store.go Mon Sep 24 11:24:42 2018 +0200 @@ -21,8 +21,9 @@ ` insertSQL = ` INSERT INTO waterway.sounding_results_contour_lines + (sounding_result_id, height, lines) SELECT - sounding_result_id, + id, $1, ST_Transform(ST_SetSRID(ST_GeomFromWKB($2), $3), 4326)::geography FROM waterway.sounding_results
--- a/schema/gemma.sql Mon Sep 24 10:58:34 2018 +0200 +++ b/schema/gemma.sql Mon Sep 24 11:24:42 2018 +0200 @@ -413,7 +413,7 @@ ) CREATE TABLE sounding_results_contour_lines ( - sounding_result_id int NOT NULL UNIQUE REFERENCES sounding_results, + sounding_result_id int NOT NULL REFERENCES sounding_results, height numeric NOT NULL, lines geography(multilinestringz, 4326) NOT NULL, UNIQUE (sounding_result_id, height)