[alembic] automaticly stamp new database with the "head" tag so migrations are easier.

also fix nix develop due to multiple top level folders
This commit is contained in:
2026-07-28 16:14:33 +02:00
parent 48d272d4d6
commit 54c7fe1ed2
2 changed files with 7 additions and 0 deletions

View File

@@ -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:

View File

@@ -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"]