Mercurial > gemma
annotate schema/updates/1437/02.configure_wms-t.sql @ 5736:55892008ec96 default tip
Fixed a bunch of corner cases in WG import.
author | Sascha Wilde <wilde@sha-bang.de> |
---|---|
date | Wed, 29 May 2024 19:02:42 +0200 |
parents | f11b9b50fcc9 |
children |
rev | line source |
---|---|
5144
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
1 UPDATE sys_admin.published_services |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
2 SET |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
3 srid = 4326, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
4 key_column = 'id', |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 wmst_attribute = 'valid_from', |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
6 wmst_end_attribute = 'valid_to', |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
7 view_def = $$ |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
8 SELECT id, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
9 lower(validity) AS valid_from, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
10 COALESCE(upper(validity), current_timestamp) AS valid_to, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
11 area, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
12 level_of_service, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
13 min_width, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
14 max_width, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
15 min_depth, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
16 date_info, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
17 source_organization, |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
18 staging_done |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
19 FROM waterway.fairway_dimensions |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
20 $$ |
f11b9b50fcc9
Keep historic data of fairway dimensions
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
21 WHERE schema = 'waterway' AND name = 'fairway_dimensions'; |