This uses alembic for managing database schema revisions in code. This is handled via migrations, each of which makes one or more changes to the schema.
alembic revision -m "create new table"
- Open the file it says it generated (in
fetcher/database/versions/
) and fill in theupgrade
anddowngrade
methods. See their operations reference for examples of table, column, and index operations.
Run alembic upgrade head
to bring you database up to date by running all the migrations it hasn't run yet.