Skip to content

Commit

Permalink
💫 [IMPR] Improve SQL view for circulations
Browse files Browse the repository at this point in the history
  • Loading branch information
Chatewgne committed Nov 28, 2023
1 parent dd14d15 commit a492b24
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion geotrek/land/templates/land/sql/post_10_views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 0 additions & 17 deletions geotrek/land/templates/land/sql/post_90_defaults.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a492b24

Please sign in to comment.