diff --git a/app/services/database.py b/app/services/database.py index 983f155..513a55c 100644 --- a/app/services/database.py +++ b/app/services/database.py @@ -8,6 +8,10 @@ engine = create_engine(SQLALCHEMY_DATABASE_URL) def create_db_and_tables(): SQLModel.metadata.create_all(engine) + from alembic.config import Config + from alembic import command + alembic_cfg = Config("./alembic.ini") + command.stamp(alembic_cfg, "head") def get_session(): with Session(engine) as db: diff --git a/pyproject.toml b/pyproject.toml index 7711393..9fe9cf6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,3 +25,6 @@ python-desfire = { git = "https://github.com/waza-ari/python-desfire" } [tool.uv.extra-build-dependencies] python-desfire = ["poetry"] "pyscard" = ["setuptools"] + +[tool.setuptools] +py-modules = ["app"]