Test reading the database revision
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 2m50s
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 2m50s
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.
This commit is contained in:
parent
2add322a25
commit
35d0c7b409
1 changed files with 28 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ import velofy
|
|||
from velofy.db import connection
|
||||
|
||||
|
||||
def current_db_revision() -> str | None: # pragma: no cover
|
||||
def current_db_revision() -> str | None:
|
||||
"""The `alembic` revision the database is at."""
|
||||
with connection.get_engine().connect() as conn:
|
||||
context = migration.MigrationContext.configure(
|
||||
|
|
|
|||
Loading…
Reference in a new issue