Mercurial > gemma
changeset 1831:74a3d8d8939e
Remove superfluous schema qualifiers in definition of the schema itself
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 16 Jan 2019 17:20:19 +0100 |
parents | f1ac917ec4a0 |
children | 661597546ed9 |
files | schema/gemma.sql |
diffstat | 1 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/schema/gemma.sql Wed Jan 16 16:59:48 2019 +0100 +++ b/schema/gemma.sql Wed Jan 16 17:20:19 2019 +0100 @@ -323,12 +323,12 @@ -- A table to help geoserver serve the distance marks as WFS 1.1.0. -- At least geoserver-2.13.2 does not serve type geography correctly -- and does not serve the location_code as isrs type - CREATE VIEW waterway.distance_marks_geoserver AS + CREATE VIEW distance_marks_geoserver AS SELECT location_code::VARCHAR, geom::Geometry(POINT, 4326), related_enc, (location_code).hectometre - FROM waterway.distance_marks_virtual + FROM distance_marks_virtual -- We need to configure primary keys for the views used by -- geoserver for wfs, otherwise it will generate ids on the fly, @@ -464,13 +464,13 @@ ) -- A view to help geoserver serve contour lines. -- At least geoserver-2.13.2 does not serve type geography correctly - CREATE VIEW waterway.sounding_results_contour_lines_geoserver AS + CREATE VIEW sounding_results_contour_lines_geoserver AS SELECT bottleneck_id, date_info, height, CAST(lines AS geometry(multilinestring, 4326)) AS lines - FROM waterway.sounding_results_contour_lines cl - JOIN waterway.sounding_results sr + FROM sounding_results_contour_lines cl + JOIN sounding_results sr ON sr.id = cl.sounding_result_id -- @@ -532,16 +532,15 @@ OR value_lifetime IS NOT NULL) ) - CREATE VIEW waterway.bottleneck_overview AS + CREATE VIEW bottleneck_overview AS SELECT objnam AS name, ST_Centroid(area)::Geometry AS point, (lower(stretch)).hectometre AS from, (upper(stretch)).hectometre AS to, sr.current::text - FROM waterway.bottlenecks bn LEFT JOIN ( - SELECT bottleneck_id, max(date_info) AS current FROM - waterway.sounding_results + FROM bottlenecks bn LEFT JOIN ( + SELECT bottleneck_id, max(date_info) AS current FROM sounding_results GROUP BY bottleneck_id) sr ON sr.bottleneck_id = bn.id ORDER BY objnam