uclahs-cds / Ligare

GNU General Public License v2.0
0 stars 0 forks source link

Add Alembic migration support to database libraries #51

Closed aholmes closed 6 months ago

aholmes commented 7 months ago

This PR adds integration with Alembic. The command bl-alembic enables the use of BL_Python's configuration system, dependency injection, use of the monorepo libraries, automatic database schema handling, support for both PostgreSQL and SQLite, and more. In addition, bl-alembic is intended to make getting started much simpler in new projects. In theory bl-alembic init or bl-alembic upgrade head will kick off everything needed to gain everything this PR offers.

Test coverage is limited, but hits most of the important parts. Don't believe the coverage % for BLAlembic. While most of the code is indeed executed, many of the possible failures and expectations are not explicitly tested.

Review #52 for some unrelated changes merged into this branch that will be merged into main.

Shell errors will be addressed in a separate PR. See #55.

This PR has changes under src/database/typings/ that do not need review. These files are type stubs automatically generated by pyright.