Commit Graph
11 Commits
Author SHA1 Message Date
John Davis bd56131ebd Split script into admin and dev
TODO: remove duplication between db.py and db_dev.py (split into
multiple commits is intentional)
2022-09-28 15:45:00 -04:00
John Davis e43552fdc5 Rename db.sh > manage_db.sh, following code review feedback 2022-09-28 15:45:00 -04:00
John Davis 503adcdf3b Override script name to display correct usage in cli help 2022-09-28 15:32:16 -04:00
John Davis dfd32a2ee8 Add type hints 2022-09-28 15:32:01 -04:00
John Davis d8e8a8efb6 Add --raiseerr option; hide error traceback by default 2022-09-28 15:25:14 -04:00
John Davis 40249133cc Revise db.sh cli command aliases
1. Remove aliases from subcommands that change things (upgrade, downgrade,
revision, init) to reduce risk of accidental usage.

2. Add aliases to readonly subcommands (history, show, version,
   dbversion)

3. Minor edits
2022-09-28 15:24:57 -04:00
John Davis 889a8445bd Change parsing of --galaxy-config option
Rationale: alternate config file applies to all subcommands, so, I
think, it is more correct to run this:

> ./db.sh -c mygalaxy.yml upgrade some-revision-id

than this:

> ./db.sh upgrade some-revision-id -c mygalaxy.yml

That's also consistent with how alembic handles this option.
2022-09-28 15:24:49 -04:00
John Davis 0c9b087543 Add init command 2022-09-28 15:24:09 -04:00
John Davis ab1854f3a7 Test against 1 or 2 databases 2022-09-28 15:23:50 -04:00
John Davis d1c9342eca Add logging to script 2022-09-28 15:23:32 -04:00
John Davis b64fda7478 Add initial draft 2022-09-28 15:23:21 -04:00