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
7 stars 13 forks source link

db migrations #466

Open smnorris opened 4 months ago

smnorris commented 4 months ago

Add scripts for db migration.

Alembic seems like a good candidate.

smnorris commented 2 months ago

I'm still not sure additional tooling for db migration is worth it. I think db schema upgrades could be done something like below, the log data is the only info that is retained between model runs:

  1. optionally, dump any log data worth retaining
  2. drop bcfishpass schema
  3. recreate bcfishpass schema by executing all files in /db
  4. optionally, re-load log

I think the only changes required are:

Down sides to this approach: