Note: due to foreign key constraints, you may need to run the migration with the flag data=true as follows:
alembic upgrade -x data=true head
This PR's main purpose is to convert the queries that back the network's initialization to use sqlalchemy instead of peewee. It also does a whole bunch of infrastructure work to enable both that and future use of sqlalchemy, including:
Marks appropriate columns as foreign keys and adds migrations to enforce these foreign keys on the database level.
Adds relationships to the models so that related resources can be easily accessed through sqlalchemy queries.
Adds model helper methods to Citation to make it easier to filter citations by citing and cited courts.
Changes to the alembic revision template to make data modifications in migrations (a) possible and (b) optional via a CLI option.
REQUIRES MIGRATION
Note: due to foreign key constraints, you may need to run the migration with the flag
data=true
as follows:alembic upgrade -x data=true head
This PR's main purpose is to convert the queries that back the network's initialization to use sqlalchemy instead of peewee. It also does a whole bunch of infrastructure work to enable both that and future use of sqlalchemy, including:
Citation
to make it easier to filter citations by citing and cited courts.Closes #31.