vinindkoeb/app/models/__init__.py
carsten 589dcbcdf5 Scaffold FastAPI + SQLModel + Alembic project, Postgres-backed
Config-driven DATABASE_URL shared by the app and Alembic's env.py
(fixes v1's config drift), psycopg3 driver, auto-discovering
app/models package for SQLModel.metadata, and a /health endpoint
that exercises the DB dependency end-to-end.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-27 15:57:44 +02:00

9 lines
349 B
Python

"""Import every model module so SQLModel.metadata is fully populated
for Alembic autogenerate — new model files are picked up automatically,
no manual registration needed here."""
from importlib import import_module
from pkgutil import iter_modules
for _, module_name, _ in iter_modules(__path__):
import_module(f"{__name__}.{module_name}")