Skip to content

Commit

Permalink
cascade view drop on db rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Jan 5, 2024
1 parent 884e3e3 commit 65378b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion db/views/wsg_crossing_summary.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
drop view if exists bcfishpass.wsg_crossing_summary_current;
drop view if exists bcfishpass.wsg_crossing_summary_current cascade;

create view bcfishpass.wsg_crossing_summary_current as
select distinct on (watershed_group_code)
Expand Down
2 changes: 1 addition & 1 deletion db/views/wsg_linear_summary.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
drop view if exists bcfishpass.wsg_linear_summary_current;
drop view if exists bcfishpass.wsg_linear_summary_current cascade;
create view bcfishpass.wsg_linear_summary_current as
select distinct on (watershed_group_code)
s.model_run_id ,
Expand Down
4 changes: 2 additions & 2 deletions model/01_access/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
PSQL=psql $(DATABASE_URL) -v ON_ERROR_STOP=1 # point psql to db and stop on errors

# process all watershed groups
WSGS = $(shell $(PSQL) -AtX -c "SELECT watershed_group_code FROM whse_basemapping.fwa_watershed_groups_poly")
#WSGS = $(shell $(PSQL) -AtX -c "SELECT watershed_group_code FROM whse_basemapping.fwa_watershed_groups_poly")
# test with just watershed groups noted in param (misses cross-wsg barreriers)
#WSGS = $(shell $(PSQL) -AtX -c "SELECT watershed_group_code FROM bcfishpass.parameters_habitat_method")
WSGS = $(shell $(PSQL) -AtX -c "SELECT watershed_group_code FROM bcfishpass.parameters_habitat_method")

# define barrier table targets
NATURAL_BARRIERS = .make/barriers_falls \
Expand Down

0 comments on commit 65378b9

Please sign in to comment.