smnorris / bcfishpass

Model and monitor aquatic habitat connectivity in BC. Tools to plan and prioritize the assessment and remediation of barriers.
https://smnorris.github.io/bcfishpass
Apache License 2.0
8 stars 13 forks source link

Added migration folder v0.5.3 #592

Closed andrewp-CWF closed 3 weeks ago

andrewp-CWF commented 3 weeks ago

Folder includes join_tracking_table_crossings_view.sql and migrate.sh

Pull request also includes additional wcrp column in wcrp_watersheds.csv

smnorris commented 3 weeks ago

looks good to me, have you already applied to the CWF databases?

I see the wcrp column in prod, so I'll merge and apply to the BC db.

andrewp-CWF commented 3 weeks ago

I added in the wcrp column and run the function, so the views are in the wcrp schemas

andrewp-CWF commented 3 weeks ago

Hey Simon, was this merged and applied to the BC db?

smnorris commented 3 weeks ago

No, the migration doesn't run as is. Can you make the changes?

andrewp-CWF commented 3 weeks ago

I can make the changes,

It seems to be failing when it tries to load the wcrp_watersheds.csv into the testing database with the extra columns. Where would I be able to alter that table? I don't think I have access to bcfishpass_test

smnorris commented 3 weeks ago

I can run the script when ready. Add the alter statement to either migrate.sh or join_tracking_table_crossings_vw.sql, remove the change from db/v0.5.0/sql/tables/wcrp.sql and I'll run. Thanks Andrew.

andrewp-CWF commented 3 weeks ago

Sounds good, I have just pushed the changes to the branch