-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* main: (22 commits) add s3 creds to monthly workflow for dra upload add missing variable to monthly download workflow fix #496 (#595) Elk crossing update 2024-11-05 (#594) Added migration folder v0.5.3 (#592) CARR-Update-2024-11-04 (#593) QUES-Update-2024-11-01 (#591) more description clarification clearer intro of feature type/connectivity params fix #588 STUL_STUR_MIDR_TAKL_UTRE_LTRE_modelled_fix (#586) fix #584 swap CH/CO descriptions, fix #582 fix #583, include CH in MIDR/TAKL watershed groups as per CWF direction BULK-Updates-Habitat-2024-10-23 (#581) BULK-Updates-2024-10-23 (#580) Fixed spelling error and missing variable assignment in auto_rank.py (#579) Additions for Tuzist'ol T'ah WCRP (#578) write modelled crossings cache and fptwg output to object storage, re… (#574) HORS_2024-10-08 (#577) ...
- Loading branch information
Showing
21 changed files
with
324 additions
and
718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
watershed_group_code,ch,cm,co,pk,sk,st,wct,notes | ||
ATNA,t,,t,,t,,, | ||
BELA,t,,t,,t,,, | ||
BONP,t,,t,,t,,, | ||
BOWR,t,,t,,t,,, | ||
BULK,t,,t,,t,t,, | ||
CARR,t,,t,,t,,, | ||
ELKR,,,,,,,t, | ||
HORS,t,,t,,t,,, | ||
LNIC,t,,t,,,t,, | ||
NECL,t,,t,,t,,, | ||
QUES,t,,t,,t,,, | ||
SHUL,t,,t,,t,,, | ||
USHU,t,,t,,t,,, | ||
watershed_group_code,ch,cm,co,pk,sk,st,wct,notes,wcrp | ||
ATNA,t,,t,,t,,,,bela_atna_necl | ||
BELA,t,,t,,t,,,,bela_atna_necl | ||
BONP,t,,t,,t,,,,tho_shu | ||
BOWR,t,,t,,t,,,,bowr_ques_carr | ||
BULK,t,,t,,t,t,,,bulk | ||
CARR,t,,t,,t,,,,bowr_ques_carr | ||
ELKR,,,,,,,t,,elkr | ||
HORS,t,,t,,t,,,,hors | ||
LNIC,t,,t,,,t,,,lnic | ||
NECL,t,,t,,t,,,,bela_atna_necl | ||
QUES,t,,t,,t,,,,bowr_ques_carr | ||
SHUL,t,,t,,t,,,,tho_shu | ||
USHU,t,,t,,t,,,,tho_shu | ||
TAKL,t,,,,t,,,,tuzistol_tah | ||
MIDR,t,,,,t,,,,tuzistol_tah | ||
UTRE,t,,,,t,,,,tuzistol_tah | ||
LTRE,t,,,,t,,,,tuzistol_tah | ||
STUL,t,,,,t,,,,tuzistol_tah | ||
STUR,t,,,,t,,,,tuzistol_tah |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
# add wcrp name column to wcrp table | ||
psql $DATABASE_URL -v ON_ERROR_STOP=1 -c "alter table bcfishpass.wcrp_watersheds add column wcrp varchar(32);" | ||
|
||
# add wcrp tracking views | ||
echo "On systems supporting CWF WCRP reporting, add join_tracking_table_crossings_view.sql" | ||
echo "psql $DATABASE_URL -v ON_ERROR_STOP=1 -f sql/join_tracking_table_crossings_view.sql" | ||
|
||
# note version | ||
psql $DATABASE_URL -v ON_ERROR_STOP=1 -c "update bcfishpass.db_version set tag = '${PWD##*/}'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
-- This function joins the tracking table to bcfishpass.crossings_wcrp_vw on the barrier ID | ||
create or replace function wcrp_hors.join_tracking_table_crossings_wcrp_vw(p_wcrp text) | ||
returns void | ||
as | ||
$$ | ||
begin | ||
execute format('create or replace view wcrp_%I.combined_tracking_table_crossings_wcrp_vw_%I as | ||
select | ||
cv.*, | ||
tt.* | ||
from bcfishpass.crossings_wcrp_vw cv | ||
join wcrp_%I.combined_tracking_table_%I tt | ||
on tt.barrier_id = cv.aggregated_crossings_id', p_wcrp, p_wcrp, p_wcrp, p_wcrp); | ||
end | ||
$$ | ||
language plpgsql; | ||
|
||
-- loop through each WCRP and create a view for each one | ||
with data (wcrp) as ( | ||
select wcrp | ||
from bcfishpass.wcrp_watersheds | ||
) | ||
select wcrp_hors.join_tracking_table_crossings_wcrp_vw(wcrp) | ||
from data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
# update DRA table | ||
psql $DATABASE_URL -v ON_ERROR_STOP=1 -f sql/dra.sql | ||
|
||
# note version | ||
psql $DATABASE_URL -v ON_ERROR_STOP=1 -c "update bcfishpass.db_version set tag = '${PWD##*/}'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
-- drop non public columns from dra transport line | ||
BEGIN; | ||
|
||
ALTER TABLE whse_basemapping.transport_line | ||
drop column create_integration_session_id, | ||
drop column create_integration_date, | ||
drop column modify_integration_session_id, | ||
drop column modify_integration_date, | ||
drop column create_partner_org_id, | ||
drop column create_partner_org, | ||
drop column modify_partner_org_id, | ||
drop column modify_partner_org, | ||
drop column custodian_partner_org_id, | ||
drop column z_value_derived_ind, | ||
drop column deactivation_date, | ||
drop column transport_line_divided_code, | ||
drop column travel_direction_code, | ||
drop column speed_limit, | ||
drop column left_number_of_lanes, | ||
drop column right_number_of_lanes, | ||
drop column under_construction_ind, | ||
drop column virtual_ind, | ||
drop column disaster_route_ind, | ||
drop column truck_route_ind, | ||
drop column left_locality_id, | ||
drop column left_locality, | ||
drop column right_locality_id, | ||
drop column right_locality, | ||
drop column left_regional_district_id, | ||
drop column right_regional_district_id, | ||
drop column structured_name_1_id, | ||
drop column structured_name_2_id, | ||
drop column structured_name_3_id, | ||
drop column structured_name_4_id, | ||
drop column structured_name_5_id, | ||
drop column structured_name_6_id, | ||
drop column structured_name_6, | ||
drop column structured_name_7_id, | ||
drop column structured_name_7, | ||
drop column highway_route_2, | ||
drop column highway_route_3, | ||
drop column industry_name_1, | ||
drop column industry_name_2, | ||
drop column industry_name_3, | ||
drop column single_house_number, | ||
drop column left_house_num_scheme_code, | ||
drop column from_left_house_number, | ||
drop column to_left_house_number, | ||
drop column right_house_num_scheme_code, | ||
drop column from_right_house_number, | ||
drop column to_right_house_number, | ||
drop column lane_restriction_code, | ||
drop column access_restriction_code, | ||
drop column from_traffic_impactor_code, | ||
drop column to_traffic_impactor_code, | ||
drop column from_left_turn_time_code, | ||
drop column from_centre_turn_time_code, | ||
drop column from_right_turn_time_code, | ||
drop column to_left_turn_time_code, | ||
drop column to_centre_turn_time_code, | ||
drop column to_right_turn_time_code, | ||
drop column from_vehicle_max_weight_kg, | ||
drop column to_vehicle_max_weight_kg, | ||
drop column from_vehicle_max_width_metre, | ||
drop column to_vehicle_max_width_metre, | ||
drop column from_vehicle_max_height_metre, | ||
drop column to_vehicle_max_height_metre, | ||
drop column ministry_of_transport_id, | ||
drop column ministry_of_transport_name, | ||
drop column integration_notes, | ||
drop column excluded_rules, | ||
drop column demographic_ind, | ||
drop column extended_data, | ||
drop column ministry_of_transport_data, | ||
drop column from_navigation_rules, | ||
drop column along_navigation_rules, | ||
drop column to_navigation_rules, | ||
drop column from_transport_node_point_id, | ||
drop column to_transport_node_point_id; | ||
|
||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.