50 lines
1.1 KiB
INI
50 lines
1.1 KiB
INI
# Alembic configuration. The actual DB URL is injected at runtime by `alembic/env.py`
|
|
# from `app.core.config.settings.database_url`, so we leave `sqlalchemy.url` empty.
|
|
[alembic]
|
|
script_location = alembic
|
|
prepend_sys_path = .
|
|
sqlalchemy.url =
|
|
|
|
# We use a YYYYMMDD_HHMM prefix on revision files for chronological readability.
|
|
file_template = %%(year)d%%(month).2d%%(day).2d_%%(hour).2d%%(minute).2d_%%(rev)s_%%(slug)s
|
|
|
|
[post_write_hooks]
|
|
# We deliberately disable post-write hooks: ruff is a dev-only dep, not installed
|
|
# in the runtime image where `alembic revision --autogenerate` runs in podman.
|
|
# Run `make fmt` on the host after generating a migration to format it.
|
|
hooks =
|
|
|
|
[loggers]
|
|
keys = root,sqlalchemy,alembic
|
|
|
|
[handlers]
|
|
keys = console
|
|
|
|
[formatters]
|
|
keys = generic
|
|
|
|
[logger_root]
|
|
level = WARNING
|
|
handlers = console
|
|
qualname =
|
|
|
|
[logger_sqlalchemy]
|
|
level = WARNING
|
|
handlers =
|
|
qualname = sqlalchemy.engine
|
|
|
|
[logger_alembic]
|
|
level = INFO
|
|
handlers =
|
|
qualname = alembic
|
|
|
|
[handler_console]
|
|
class = StreamHandler
|
|
args = (sys.stderr,)
|
|
level = NOTSET
|
|
formatter = generic
|
|
|
|
[formatter_generic]
|
|
format = %(levelname)-5.5s [%(name)s] %(message)s
|
|
datefmt = %Y-%m-%d %H:%M:%S
|