Update 'README.md'
This commit is contained in:
@@ -4,11 +4,13 @@ Compact template for FastAPI-based projects. SQLAlchemy ORM and Alembic migratio
|
|||||||
|
|
||||||
## Alembic
|
## Alembic
|
||||||
|
|
||||||
To add new models to migrations you need to import them inside `migrations/env.py`.
|
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:
|
To quickly migrate:
|
||||||
|
|
||||||
docker-compose exec web bash
|
docker-compose exec web bash
|
||||||
pipenv run alembic upgrate head
|
pipenv run alembic upgrade head
|
||||||
|
|
||||||
So that all `.env` varibles will be catched properly
|
So that all `.env` varibles will be catched properly
|
||||||
|
|||||||
Reference in New Issue
Block a user