diff --git a/db/functions/wsg_crossing_summary.sql b/db/functions/wsg_crossing_summary.sql index e24e6f61..106e8e4b 100644 --- a/db/functions/wsg_crossing_summary.sql +++ b/db/functions/wsg_crossing_summary.sql @@ -3,6 +3,7 @@ -- - accessible (per model) -- - with spawning rearing habitat upstream (per model) +DROP FUNCTION IF EXISTS bcfishpass.wsg_crossings_summary(); CREATE FUNCTION bcfishpass.wsg_crossings_summary() RETURNS table ( watershed_group_code text, diff --git a/db/functions/wsg_linear_summary.sql b/db/functions/wsg_linear_summary.sql index 4922dcb6..077220b7 100644 --- a/db/functions/wsg_linear_summary.sql +++ b/db/functions/wsg_linear_summary.sql @@ -10,7 +10,7 @@ -- - spawning or rearing habitat not isolated by dam or a known pscis barrier (accessible_a) -- - spawning or rearing habitat not isolated by all anthropogenic barriers (observed and modelled) (accessible_b) -DROP FUNCTION bcfishpass.wsg_linear_summary(); +DROP FUNCTION IF EXISTS bcfishpass.wsg_linear_summary(); CREATE FUNCTION bcfishpass.wsg_linear_summary() RETURNS table ( watershed_group_code text,