s365b.db.migrate¶
Run and create database migrations (wraps Alembic).
Migrations ship inside the package, so the container image needs no
alembic.ini.
Attributes¶
Functions¶
|
Build an Alembic config pointing at the packaged migrations. |
|
Apply migrations up to |
|
Create a new migration from model changes (developers only). |
Module Contents¶
- s365b.db.migrate.alembic_config(database_url: str | None = None) alembic.config.Config[source]¶
Build an Alembic config pointing at the packaged migrations.
- Parameters:
database_url – Override the URL from settings (tests).
- Returns:
The Alembic config.