From a1bcb28ceaaa5d9b45cac80d5a7c82a4450fc0d4 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Thu, 31 Oct 2019 18:26:41 +0100 Subject: [PATCH] also update wikipedia from linked places --- utils/update.php | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/update.php b/utils/update.php index ef7e3c9f..31c911cc 100644 --- a/utils/update.php +++ b/utils/update.php @@ -328,6 +328,7 @@ if ($aResult['recompute-importance']) { $sSQL = 'ALTER TABLE placex DISABLE TRIGGER ALL;'; $sSQL .= 'UPDATE placex SET (wikipedia, importance) = (SELECT wikipedia, importance FROM compute_importance(extratags, country_code, osm_type, osm_id));'; + $sSQL .= 'UPDATE placex s SET wikipedia = d.wikipedia, importance = d.importance FROM placex d WHERE s.place_id = d.linked_place_id and d.wikipedia is not null and (s.wikipedia is null or s.importance < d.importance);'; $sSQL .= 'ALTER TABLE placex ENABLE TRIGGER ALL;'; $oDB->exec($sSQL); } -- 2.39.5