Skip to content

Commit

Permalink
Merge pull request #14 from PnX-SI/development
Browse files Browse the repository at this point in the history
suppression extension unaccent de construction url pr Gt-rando v3
  • Loading branch information
IdrissaD authored Oct 13, 2021
2 parents dbb66a6 + dcc8d73 commit 5e06045
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geotrek/v_treks_schema.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- testé avec : Schéma de données 1.0.0 / PostgreSQL 10.17 / PostGIS 2.4.3 / unaccent 1.1 / Geotrek-admin 2.62.0
-- testé avec : Schéma de données 1.0.2 / PostgreSQL 10.17 / PostGIS 2.4.3 / unaccent 1.1 / Geotrek-admin 2.62.0

-- CREATE EXTENSION IF NOT EXISTS unaccent;

Expand Down Expand Up @@ -93,7 +93,7 @@ SELECT
(SELECT url_rando FROM constants LIMIT 1) || lower(unaccent(replace(tp.practice_name, ' ', '-'))) || '/'
|| lower(unaccent(replace(btrim(regexp_replace(t."name", '[^\w -]', '', 'g')), ' ', '-'))) || '/' AS url,
-- construction de l'url valable pour Geotrek-rando V3 :
-- (SELECT url_rando FROM constants LIMIT 1) || 'trek/' || t.topo_object_id || '-' || unaccent(replace(btrim(regexp_replace(t."name", '[^\w -]', '', 'g')), ' ', '-')) AS url
-- (SELECT url_rando FROM constants LIMIT 1) || 'trek/' || t.topo_object_id || '-' || replace(btrim(regexp_replace(t."name", '[^\w -]', '', 'g')), ' ', '-') AS url,
NULL AS id_osm,
t."name" AS nom_itineraire,
tp.practice_name AS pratique, -- uniquement valable si vos noms de pratiques correspondent déjà au schéma, sinon passer par quelque chose comme : CASE WHEN tp.practice_name ILIKE 'Randonnée Trail' THEN 'trail'::text END AS pratique
Expand Down

0 comments on commit 5e06045

Please sign in to comment.