Skip to content

Commit

Permalink
fix view name
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Jan 10, 2024
1 parent e0714ca commit acf6d79
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions db/views/11_streams_bt_vw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ select
a.remediated_dnstr_ind,
h.spawning_bt as spawning,
h.rearing_bt as rearing,
hu.spawning_bt as spawning_known,
hu.rearing_bt as rearing_known,
hk.spawning_bt as spawning_known,
hk.rearing_bt as rearing_known,
m.mapping_code_bt as mapping_code,
s.geom
from bcfishpass.streams s
left outer join bcfishpass.streams_access_vw a on s.segmented_stream_id = a.segmented_stream_id
left outer join bcfishpass.streams_habitat_linear_vw h on s.segmented_stream_id = h.segmented_stream_id
left outer join bcfishpass.streams_mapping_code_vw m on s.segmented_stream_id = m.segmented_stream_id
left outer join bcfishpass.streams_habitat_user_vw hu on s.segmented_stream_id = hu.segmented_stream_id
left outer join bcfishpass.streams_habitat_known_vw hk on s.segmented_stream_id = hk.segmented_stream_id
where cardinality(a.barriers_bt_dnstr) = 0;
6 changes: 3 additions & 3 deletions db/views/12_streams_ch_vw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ select
a.remediated_dnstr_ind,
h.spawning_ch as spawning,
h.rearing_ch as rearing,
hu.spawning_ch as spawning_known,
hu.rearing_ch as rearing_known,
hk.spawning_ch as spawning_known,
hk.rearing_ch as rearing_known,
m.mapping_code_ch as mapping_code,
s.geom
from bcfishpass.streams s
left outer join bcfishpass.streams_access_vw a on s.segmented_stream_id = a.segmented_stream_id
left outer join bcfishpass.streams_habitat_linear_vw h on s.segmented_stream_id = h.segmented_stream_id
left outer join bcfishpass.streams_mapping_code_vw m on s.segmented_stream_id = m.segmented_stream_id
left outer join bcfishpass.streams_habitat_user_vw hu on s.segmented_stream_id = hu.segmented_stream_id
left outer join bcfishpass.streams_habitat_known_vw hk on s.segmented_stream_id = hk.segmented_stream_id
where barriers_ch_cm_co_pk_sk_dnstr = array[]::text[];
4 changes: 2 additions & 2 deletions db/views/13_streams_cm_vw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ select
a.remediated_dnstr_ind,
h.spawning_cm as spawning,
null as rearing,
hu.spawning_ch as spawning_known,
hk.spawning_ch as spawning_known,
null as rearing_known,
m.mapping_code_cm as mapping_code,
s.geom
from bcfishpass.streams s
left outer join bcfishpass.streams_access_vw a on s.segmented_stream_id = a.segmented_stream_id
left outer join bcfishpass.streams_habitat_linear_vw h on s.segmented_stream_id = h.segmented_stream_id
left outer join bcfishpass.streams_mapping_code_vw m on s.segmented_stream_id = m.segmented_stream_id
left outer join bcfishpass.streams_habitat_user_vw hu on s.segmented_stream_id = hu.segmented_stream_id
left outer join bcfishpass.streams_habitat_known_vw hk on s.segmented_stream_id = hk.segmented_stream_id
where barriers_ch_cm_co_pk_sk_dnstr = array[]::text[];
6 changes: 3 additions & 3 deletions db/views/14_streams_co_vw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ select
a.remediated_dnstr_ind,
h.spawning_co as spawning,
h.rearing_co as rearing,
hu.spawning_co as spawning_known,
hu.rearing_co as rearing_known,
hk.spawning_co as spawning_known,
hk.rearing_co as rearing_known,
m.mapping_code_co as mapping_code,
geom
from bcfishpass.streams s
left outer join bcfishpass.streams_access_vw a on s.segmented_stream_id = a.segmented_stream_id
left outer join bcfishpass.streams_habitat_linear_vw h on s.segmented_stream_id = h.segmented_stream_id
left outer join bcfishpass.streams_mapping_code_vw m on s.segmented_stream_id = m.segmented_stream_id
left outer join bcfishpass.streams_habitat_user_vw hu on s.segmented_stream_id = hu.segmented_stream_id
left outer join bcfishpass.streams_habitat_known_vw hk on s.segmented_stream_id = hk.segmented_stream_id
where barriers_ch_cm_co_pk_sk_dnstr = array[]::text[];
4 changes: 2 additions & 2 deletions db/views/15_streams_pk_vw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ select
a.remediated_dnstr_ind,
h.spawning_pk as spawning,
null as rearing,
hu.spawning_pk as spawning_known,
hk.spawning_pk as spawning_known,
null as rearing_known,
m.mapping_code_pk as mapping_code,
s.geom
from bcfishpass.streams s
left outer join bcfishpass.streams_access_vw a on s.segmented_stream_id = a.segmented_stream_id
left outer join bcfishpass.streams_habitat_linear_vw h on s.segmented_stream_id = h.segmented_stream_id
left outer join bcfishpass.streams_mapping_code_vw m on s.segmented_stream_id = m.segmented_stream_id
left outer join bcfishpass.streams_habitat_user_vw hu on s.segmented_stream_id = hu.segmented_stream_id
left outer join bcfishpass.streams_habitat_known_vw hk on s.segmented_stream_id = hk.segmented_stream_id
where barriers_ch_cm_co_pk_sk_dnstr = array[]::text[];
18 changes: 9 additions & 9 deletions db/views/16_streams_salmon_vw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ select
-- known spawning
case
when
hu.spawning_ch is true or
hu.spawning_cm is true or
hu.spawning_co is true or
hu.spawning_pk is true or
hu.spawning_sk is true
hk.spawning_ch is true or
hk.spawning_cm is true or
hk.spawning_co is true or
hk.spawning_pk is true or
hk.spawning_sk is true
then true
end as spawning_known,
-- known rearing
case
when
hu.rearing_ch is true or
hu.rearing_co is true or
hu.rearing_sk is true
hk.rearing_ch is true or
hk.rearing_co is true or
hk.rearing_sk is true
then true
end as rearing_known,
m.mapping_code_salmon as mapping_code,
Expand All @@ -77,5 +77,5 @@ from bcfishpass.streams s
left outer join bcfishpass.streams_access_vw a on s.segmented_stream_id = a.segmented_stream_id
left outer join bcfishpass.streams_habitat_linear_vw h on s.segmented_stream_id = h.segmented_stream_id
left outer join bcfishpass.streams_mapping_code_vw m on s.segmented_stream_id = m.segmented_stream_id
left outer join bcfishpass.streams_habitat_user_vw hu on s.segmented_stream_id = hu.segmented_stream_id
left outer join bcfishpass.streams_habitat_known_vw hk on s.segmented_stream_id = hk.segmented_stream_id
where barriers_ch_cm_co_pk_sk_dnstr = array[]::text[];
6 changes: 3 additions & 3 deletions db/views/17_streams_sk_vw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ select
a.remediated_dnstr_ind,
h.spawning_sk as spawning,
h.rearing_sk as rearing,
hu.spawning_sk as spawning_known,
hu.rearing_sk as rearing_known,
hk.spawning_sk as spawning_known,
hk.rearing_sk as rearing_known,
m.mapping_code_sk as mapping_code,
s.geom
from bcfishpass.streams s
left outer join bcfishpass.streams_access_vw a on s.segmented_stream_id = a.segmented_stream_id
left outer join bcfishpass.streams_habitat_linear_vw h on s.segmented_stream_id = h.segmented_stream_id
left outer join bcfishpass.streams_mapping_code_vw m on s.segmented_stream_id = m.segmented_stream_id
left outer join bcfishpass.streams_habitat_user_vw hu on s.segmented_stream_id = hu.segmented_stream_id
left outer join bcfishpass.streams_habitat_known_vw hk on s.segmented_stream_id = hk.segmented_stream_id
where barriers_ch_cm_co_pk_sk_dnstr = array[]::text[];
6 changes: 3 additions & 3 deletions db/views/18_streams_st_vw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ select
a.remediated_dnstr_ind,
h.spawning_st as spawning,
h.rearing_st as rearing,
hu.spawning_st as spawning_known,
hu.rearing_st as rearing_known,
hk.spawning_st as spawning_known,
hk.rearing_st as rearing_known,
m.mapping_code_st as mapping_code,
s.geom
from bcfishpass.streams s
left outer join bcfishpass.streams_access_vw a on s.segmented_stream_id = a.segmented_stream_id
left outer join bcfishpass.streams_habitat_linear_vw h on s.segmented_stream_id = h.segmented_stream_id
left outer join bcfishpass.streams_mapping_code_vw m on s.segmented_stream_id = m.segmented_stream_id
left outer join bcfishpass.streams_habitat_user_vw hu on s.segmented_stream_id = hu.segmented_stream_id
left outer join bcfishpass.streams_habitat_known_vw hk on s.segmented_stream_id = hk.segmented_stream_id
where barriers_st_dnstr = array[]::text[];
6 changes: 3 additions & 3 deletions db/views/19_streams_wct_vw.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ select
a.remediated_dnstr_ind,
h.spawning_wct as spawning,
h.rearing_wct as rearing,
hu.spawning_wct as spawning_known,
hu.rearing_wct as rearing_known,
hk.spawning_wct as spawning_known,
hk.rearing_wct as rearing_known,
m.mapping_code_wct as mapping_code,
s.geom
from bcfishpass.streams s
left outer join bcfishpass.streams_access_vw a on s.segmented_stream_id = a.segmented_stream_id
left outer join bcfishpass.streams_habitat_linear_vw h on s.segmented_stream_id = h.segmented_stream_id
left outer join bcfishpass.streams_mapping_code_vw m on s.segmented_stream_id = m.segmented_stream_id
left outer join bcfishpass.streams_habitat_user_vw hu on s.segmented_stream_id = hu.segmented_stream_id
left outer join bcfishpass.streams_habitat_known_vw hk on s.segmented_stream_id = hk.segmented_stream_id
where barriers_wct_dnstr = array[]::text[];

0 comments on commit acf6d79

Please sign in to comment.