[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:
@@ -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:
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user