Set up migration environment with alembic

This commit is contained in:
2025-10-12 20:51:10 +02:00
parent 494170e2ab
commit 84f128806c
8 changed files with 311 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ description = "Add your description here"
readme = "README.md"
requires-python = "~=3.13.0"
dependencies = [
"alembic>=1.17.0",
"fastapi[standard]>=0.116.0",
"sqlalchemy>=2.0.44",
"uvicorn[standard]>=0.35.0",
@@ -17,3 +18,23 @@ dev = [
]
[tool.isort]
profile = "black"
[tool.alembic]
# path to migration scripts.
# this is typically a path given in POSIX (e.g. forward slashes)
# format, relative to the token %(here)s which refers to the location of this
# ini file
script_location = "%(here)s/alembic"
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
# Uncomment the line below if you want the files to be prepended with date and time
# see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
# for all available tokens
file_template = "%%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s"
# additional paths to be prepended to sys.path. defaults to the current working directory.
prepend_sys_path = [
"."
]