make sure linked places get recomputed when unlinked

When linked the place may not be in the search index,
so it must be reindexed when being unlinked. The status
change will only have an effect during the subsequent
update, so change tests to that effect.
This commit is contained in:
Sarah Hoffmann
2016-03-28 09:51:29 +02:00
parent 53eb9a5f14
commit 23fa6018a4
2 changed files with 6 additions and 1 deletions

View File

@@ -1161,7 +1161,8 @@ BEGIN
DELETE FROM place_addressline WHERE place_id = NEW.place_id;
result := deleteRoad(NEW.partition, NEW.place_id);
result := deleteLocationArea(NEW.partition, NEW.place_id, NEW.rank_search);
UPDATE placex set linked_place_id = null where linked_place_id = NEW.place_id;
UPDATE placex set linked_place_id = null, indexed_status = 2
where linked_place_id = NEW.place_id;
IF NEW.linked_place_id is not null THEN
RETURN NEW;