feat(db): adjust ticket offices of update-db.sh

This commit is contained in:
dancingCycle 2023-08-01 11:38:48 +02:00
parent c9182b959b
commit cddb3de560
1 changed files with 3 additions and 3 deletions

View File

@ -6,10 +6,10 @@ DROP TABLE IF EXISTS :schema.tbl_shop_ticket;
DROP VIEW IF EXISTS :schema.vw_shop_ticket;
CREATE OR REPLACE VIEW :schema.vw_shop_ticket AS
SELECT entity.osm_id, entity."tickets:public_transport", entity.name, entity.st_x, entity.st_y
SELECT entity.osm_id, entity.shop, entity.name, entity.st_x, entity.st_y
FROM (
--planet_osm_point/node
SELECT osmNode.osm_id, osmNode."tickets:public_transport", osmNode.name,
SELECT osmNode.osm_id, osmNode.shop, osmNode.name,
st_x(st_transform(osmNode.way, 4326)) AS st_x,
st_y(st_transform(osmNode.way, 4326)) AS st_y
FROM planet_osm_point AS osmNode
@ -20,7 +20,7 @@ WHERE
AND osmNode.proposed IS NULL
UNION
--planet_osm_polygone/way
SELECT osmWay.osm_id, osmWay."tickets:public_transport", osmWay.name,
SELECT osmWay.osm_id, osmWay.shop, osmWay.name,
st_x(st_centroid(st_transform(osmWay.way, 4326))) AS st_x,
st_y(st_centroid(st_transform(osmWay.way, 4326))) AS st_y
FROM planet_osm_polygon AS osmWay