mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-26 06:22:13 +03:00
avoid deletes for new places
This commit is contained in:
parent
44f5058deb
commit
e8b43eeaad
@ -1232,11 +1232,13 @@ BEGIN
|
|||||||
RETURN NEW;
|
RETURN NEW;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
IF OLD.indexed_status > 1 THEN
|
||||||
result := deleteSearchName(NEW.partition, NEW.place_id);
|
result := deleteSearchName(NEW.partition, NEW.place_id);
|
||||||
DELETE FROM place_addressline WHERE place_id = NEW.place_id;
|
DELETE FROM place_addressline WHERE place_id = NEW.place_id;
|
||||||
DELETE FROM place_boundingbox where place_id = NEW.place_id;
|
DELETE FROM place_boundingbox where place_id = NEW.place_id;
|
||||||
result := deleteRoad(NEW.partition, NEW.place_id);
|
result := deleteRoad(NEW.partition, NEW.place_id);
|
||||||
result := deleteLocationArea(NEW.partition, NEW.place_id);
|
result := deleteLocationArea(NEW.partition, NEW.place_id);
|
||||||
|
END IF;
|
||||||
|
|
||||||
-- reclaculate country and partition (should probably have a country_code and calculated_country_code as seperate fields)
|
-- reclaculate country and partition (should probably have a country_code and calculated_country_code as seperate fields)
|
||||||
SELECT country_code from place where osm_type = NEW.osm_type and osm_id = NEW.osm_id and class = NEW.class and type = NEW.type INTO NEW.country_code;
|
SELECT country_code from place where osm_type = NEW.osm_type and osm_id = NEW.osm_id and class = NEW.class and type = NEW.type INTO NEW.country_code;
|
||||||
|
Loading…
Reference in New Issue
Block a user