From a492b241f22ba194c34f1975aca9f52e2e3c3189 Mon Sep 17 00:00:00 2001 From: Chatewgne Date: Tue, 28 Nov 2023 17:09:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=AB=20[IMPR]=20Improve=20SQL=20view=20?= =?UTF-8?q?for=20circulations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../land/templates/land/sql/post_10_views.sql | 2 +- .../templates/land/sql/post_90_defaults.sql | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/geotrek/land/templates/land/sql/post_10_views.sql b/geotrek/land/templates/land/sql/post_10_views.sql index 679561d4db..786d3a2fdf 100644 --- a/geotrek/land/templates/land/sql/post_10_views.sql +++ b/geotrek/land/templates/land/sql/post_10_views.sql @@ -34,7 +34,7 @@ CREATE VIEW {{ schema_geotrek }}.v_workmanagements AS ( ); CREATE VIEW {{ schema_geotrek }}.v_circulations AS ( - SELECT e.*, b.structure_id, b.name + SELECT e.*, b.structure_id, b.name AS "Type", c.name AS "Authorization" FROM core_topology AS e, land_circulationedge AS f, land_circulationtype AS b, land_authorizationtype as c WHERE f.topo_object_id = e.id AND f.circulation_type_id = b.id AND f.authorization_type_id = c.id AND deleted = FALSE diff --git a/geotrek/land/templates/land/sql/post_90_defaults.sql b/geotrek/land/templates/land/sql/post_90_defaults.sql index ccc9c76de1..d985b0e0ed 100644 --- a/geotrek/land/templates/land/sql/post_90_defaults.sql +++ b/geotrek/land/templates/land/sql/post_90_defaults.sql @@ -68,20 +68,3 @@ ALTER TABLE land_landedge ALTER COLUMN agreement SET DEFAULT False; ------------------------------------- -- label -- structure - - --- Infrastructure ------------------ --- type --- maintenance_difficulty --- usage_difficulty -ALTER TABLE infrastructure_infrastructure ALTER COLUMN accessibility SET DEFAULT ''; --- topo_object --- name -ALTER TABLE infrastructure_infrastructure ALTER COLUMN description SET DEFAULT ''; --- condition --- implantation_year --- eid -ALTER TABLE infrastructure_infrastructure ALTER COLUMN published SET DEFAULT FALSE; --- publication_date --- structure