| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Expand the migrations/Alembic docs with a working, end-to-end example: - Explain where the SQLAlchemy MetaData comes from in ormar and how to expose it for Alembic. - Add a sample project layout with my_project/models.py, alembic.ini, and alembic/env.py. - Show how to handle models split across multiple apps/packages by importing all models before Alembic reads the metadata. - Keep the existing compare_type and include_object tips intact. Fixes ormar-orm#1400
| Back | FazBrowse Home | New Git URL |
Fixes #1400.
The current Alembic docs skip too many steps for anyone new to ormar — imports, where metadata comes from, and how to handle models split across apps. I added a complete, working example based on the FastAPI-template reference linked in the issue.
It covers a single-file layout, a multi-app layout, a minimal alembic.ini, and wiring the shared metadata into alembic/env.py. I ran alembic revision --autogenerate and alembic upgrade head against both layouts and built the docs with mkdocs build to make sure everything works.