Read the database revision with the Alembic API #19

Merged
alexander merged 3 commits from alembic-api into develop 2026-12-02 14:05:17 +01:00
Owner

The @db_revision decorator locks completed stages of the data pipeline to the revision they were carried out at.

We now make it not use a subprocess and also add test cases to have it covered 100%.

The `@db_revision` decorator locks completed stages of the data pipeline to the revision they were carried out at. We now make it not use a `subprocess` and also add test cases to have it covered 100%.
The `@db_revision` decorator no longer runs `alembic current` in a subprocess,
which only worked from the project folder and reported any failure as a wrong revision.

Also, its docstring now explains that it locks completed stages of the data pipeline.
The `@db_revision` decorator no longer skips its check under `TESTING`.

The tests replace `current_db_revision()` with the revision they need.
Test reading the database revision
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 2m50s
35d0c7b409
In the "sequentially" variant of the test database,
`current_db_revision()` must return the head of the migrations;
in the "all_at_once" variant, there is no version table.
alexander merged commit a85d426b6e into develop 2026-12-02 14:05:17 +01:00
alexander deleted branch alembic-api 2026-12-02 14:05:17 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
alexander/velofy!19
No description provided.