From 360d8588f72a2c58f25b4d6b9b05db790410bb89 Mon Sep 17 00:00:00 2001 From: Simon Norris Date: Mon, 11 Dec 2023 12:46:07 -0800 Subject: [PATCH] Issue429 (#430) * fix #429 * include dam name in dam barrier tables --- model/01_access/sql/barriers_dams.sql | 2 +- model/01_access/sql/barriers_dams_hydro.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model/01_access/sql/barriers_dams.sql b/model/01_access/sql/barriers_dams.sql index 4e99ffa2..a5293ff8 100644 --- a/model/01_access/sql/barriers_dams.sql +++ b/model/01_access/sql/barriers_dams.sql @@ -16,7 +16,7 @@ INSERT INTO bcfishpass.barriers_dams SELECT aggregated_crossings_id, crossing_feature_type, - crossing_source as barrier_name, + dam_name as barrier_name, linear_feature_id, blue_line_key, watershed_key, diff --git a/model/01_access/sql/barriers_dams_hydro.sql b/model/01_access/sql/barriers_dams_hydro.sql index e9250115..4845dbfe 100644 --- a/model/01_access/sql/barriers_dams_hydro.sql +++ b/model/01_access/sql/barriers_dams_hydro.sql @@ -16,7 +16,7 @@ INSERT INTO bcfishpass.barriers_dams_hydro SELECT aggregated_crossings_id, crossing_feature_type, - crossing_source as barrier_name, + dam_name as barrier_name, linear_feature_id, blue_line_key, watershed_key, @@ -29,7 +29,7 @@ FROM bcfishpass.crossings WHERE dam_id IS NOT NULL AND dam_use = 'Hydroelectricity' AND - barrier_status = 'BARRIER' AND + barrier_status in ('PARTIAL', 'BARRIER') AND blue_line_key = watershed_key AND -- do not include side channel features as barriers watershed_group_code = :'wsg' ORDER BY watershed_group_code, blue_line_key, downstream_route_measure; \ No newline at end of file