17 lines
448 B
Markdown
17 lines
448 B
Markdown
# FastAPI Boilerplate
|
|
|
|
Compact template for FastAPI-based projects. SQLAlchemy ORM and Alembic migrations included.
|
|
|
|
## Alembic
|
|
|
|
To add new models to migrations you need to import them inside `migrations/env.py`. And then create migration:
|
|
|
|
pipenv run alembic revision --autogenerate -m "<bla-bla>"
|
|
|
|
To quickly migrate:
|
|
|
|
docker-compose exec web bash
|
|
pipenv run alembic upgrade head
|
|
|
|
So that all `.env` varibles will be catched properly
|