diff --git a/README.md b/README.md index 510ec55..1759d22 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ In testing, newest revision will be applied automatically before test runs. To run migrations manually before spinning up the docker containers, go to ```/src``` and: * Create new revision: ``` -docker-compose run fastapi_server alembic revision --autogenerate -m "The hottest new db changes around" +docker-compose exec fastapi_server alembic revision --autogenerate -m "The hottest new db changes around" ``` This will try to capture the newest changes automatically. Check that the changes were correctly mapped by looking into @@ -86,7 +86,7 @@ the revision file in ```/fastapi_server/migrations/versions```. Revisions can be created manually to if needed. * Apply migrations: ``` -docker-compose run fastapi_server alembic upgrade head +docker-compose exec fastapi_server alembic upgrade head ``` If you get an error like *Target database is not up to date.* you might have to manually tell alembic that the current migration represents the state of the database @@ -95,7 +95,7 @@ with ```docker-compose run fastapi_server alembic stamp head``` before upgrading ### Testing Head to ```/src``` folder and run: ``` -docker-compose run fastapi_server pytest . +docker-compose exec fastapi_server pytest . ``` ### Web Routes & Documentation