Skip to content

Update README.md #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ 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
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
Expand All @@ -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
Expand Down