Skip to content

Commit

Permalink
run add column wcrp to wcrp_watersheds on all systems
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Nov 4, 2024
1 parent 97cc8b5 commit 94aae1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 6 additions & 2 deletions db/v0.5.3/migrate.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +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 -f sql/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 -c "update bcfishpass.db_version set tag = '${PWD##*/}'"
psql $DATABASE_URL -v ON_ERROR_STOP=1 -c "update bcfishpass.db_version set tag = '${PWD##*/}'"
4 changes: 0 additions & 4 deletions db/v0.5.3/sql/join_tracking_table_crossings_vw.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
-- Add the wcrp column to the wcrp_watersheds table
alter table bcfishpass.wcrp_watersheds
add column wcrp varchar(32);

-- 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
Expand Down

0 comments on commit 94aae1e

Please sign in to comment.