From 382b12ae8a7032e0f57a4dbd72c7f5399c615314 Mon Sep 17 00:00:00 2001 From: Tomas Pohanka Date: Wed, 3 Apr 2024 13:43:28 +0200 Subject: [PATCH] Drop osm_transportation_name_network table before recreation. (#1653) Drop the main table for layer `transportation_name` layer before creation. For the first SQL import, it is OK, but for the second import (e.g. for a different country by `import-osm area=yyy`) without dropping the whole database it will keep `osm_transportation_name_network` filled with data from the first import (after first `import-sql` step) This PR will drop the already-filled table from the first import and insert data from the reimported area. --- layers/transportation/update_transportation_merge.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layers/transportation/update_transportation_merge.sql b/layers/transportation/update_transportation_merge.sql index dcdbab5e..84e45194 100644 --- a/layers/transportation/update_transportation_merge.sql +++ b/layers/transportation/update_transportation_merge.sql @@ -66,7 +66,8 @@ $$ LANGUAGE SQL IMMUTABLE -- etldoc: osm_highway_linestring -> osm_transportation_name_network -- etldoc: transportation_route_member_coalesced -> osm_transportation_name_network -CREATE TABLE IF NOT EXISTS osm_transportation_name_network AS +DROP TABLE IF EXISTS osm_transportation_name_network; +CREATE TABLE osm_transportation_name_network AS SELECT geometry, osm_id,