Commit Graph
13 Commits
Author SHA1 Message Date
John Davis 1dd03218bd Edit db wrapper scripts for consistency, add TS script 2023-02-08 00:33:48 -05:00
John Davis 6d1ee9d4f3 Remove duplication 2022-09-16 00:39:44 -04:00
John Davis 1eb4d15f38 Split script into admin and dev
TODO: remove duplication between db.py and db_dev.py (split into
multiple commits is intentional)
2022-09-16 00:39:44 -04:00
John Davis b6a5286487 Rename db.sh > manage_db.sh, following code review feedback 2022-09-16 00:39:44 -04:00
John Davis 2aaf6b8896 Override script name to display correct usage in cli help 2022-09-16 00:39:03 -04:00
John Davis 372d4af0b8 Add type hints 2022-09-16 00:39:03 -04:00
John Davis 7e238bf591 Add --raiseerr option; hide error traceback by default 2022-09-16 00:39:03 -04:00
John Davis 330d2043c1 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-16 00:39:03 -04:00
John Davis 1f25c6ee96 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-16 00:39:03 -04:00
John Davis de856e825a Add init command 2022-09-16 00:39:03 -04:00
John Davis 0a798ea536 Test against 1 or 2 databases 2022-09-16 00:39:03 -04:00
John Davis 811392b468 Add logging to script 2022-09-16 00:39:03 -04:00
John Davis a69ab407a6 Add initial draft 2022-09-16 00:39:03 -04:00