fix(db): adjust SQL syntax
This commit is contained in:
parent
11787794a2
commit
edf68563a8
|
@ -5,7 +5,7 @@ SET search_path to :schema, public;
|
|||
DROP TABLE IF EXISTS :schema.tbl_railway;
|
||||
DROP VIEW IF EXISTS :schema.vw_park_ride;
|
||||
|
||||
CREATE OR REPLACE VIEW IF NOT EXISTS :schema.vw_park_ride AS
|
||||
CREATE OR REPLACE VIEW :schema.vw_park_ride AS
|
||||
SELECT entity.osm_id, entity.park_ride, entity.name, entity.st_x, entity.st_y
|
||||
FROM (
|
||||
--planet_osm_point/node
|
||||
|
|
|
@ -5,7 +5,7 @@ SET search_path to :schema, public;
|
|||
DROP TABLE IF EXISTS :schema.tbl_poi;
|
||||
DROP VIEW IF EXISTS :schema.vw_poi;
|
||||
|
||||
CREATE OR REPLACE VIEW IF NOT EXISTS :schema.vw_poi AS
|
||||
CREATE OR REPLACE VIEW :schema.vw_poi AS
|
||||
|
||||
SELECT foo.id, foo.osm_id, foo.name, foo.kategorie, lk.name as landkreis,
|
||||
CASE WHEN gem.name IS NULL THEN lk.name ELSE gem.name END as gemeinde,
|
||||
|
|
|
@ -5,7 +5,7 @@ SET search_path to :schema, public;
|
|||
DROP TABLE IF EXISTS :schema.tbl_railway;
|
||||
DROP VIEW IF EXISTS :schema.vw_railway;
|
||||
|
||||
CREATE OR REPLACE VIEW IF NOT EXISTS :schema.vw_railway AS
|
||||
CREATE OR REPLACE VIEW :schema.vw_railway AS
|
||||
SELECT foo.id,
|
||||
foo.osm_id,
|
||||
foo.railway,
|
||||
|
|
|
@ -4,7 +4,7 @@ SET search_path to :schema, public;
|
|||
|
||||
DROP VIEW IF EXISTS :schema.vw_counties CASCADE;
|
||||
|
||||
CREATE OR REPLACE VIEW IF NOT EXISTS :schema.vw_counties AS
|
||||
CREATE OR REPLACE VIEW :schema.vw_counties AS
|
||||
SELECT planet_osm_polygon.osm_id,
|
||||
planet_osm_polygon.name,
|
||||
planet_osm_polygon.boundary,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
CREATE SCHEMA IF NOT EXISTS :schema;
|
||||
SET search_path to :schema, public;
|
||||
|
||||
CREATE OR REPLACE VIEW IF NOT EXISTS :schema.vw_export_poi AS
|
||||
CREATE OR REPLACE VIEW :schema.vw_export_poi AS
|
||||
|
||||
SELECT foo.id, foo.kat, tl.deutsch as kat_de, tl.english as kat_en, foo.kat_sub as kat_sub_de, foo.kat_sub as kat_sub_en, foo.name,
|
||||
foo.adr_street AS strasse, foo.plz, foo.gemeinde, foo.landkreis,
|
||||
|
|
Loading…
Reference in New Issue