Skip to content

Commit

Permalink
Docs: Add instructions for fixing migration issues with docker
Browse files Browse the repository at this point in the history
  • Loading branch information
SverreNystad committed Jan 6, 2024
1 parent 3b5c7e0 commit 9185adb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,23 @@ docker-compose run tutorai python manage.py makemigrations
docker-compose run tutorai python manage.py migrate
```

## If the migrations are not working

One need to delete migrations files in migrations folders. Shut down the docker-compose and remove the database volume. Then run the following commands:

```bash
docker-compose down
docker volume rm backend_postgres_data
```
Then you can apply the migrations again.
```bash
docker-compose run tutorai python manage.py makemigrations
docker-compose run tutorai python manage.py migrate
```
and then run the docker-compose again.
```bash
docker-compose up
```

## How to create a new application in the backend

Expand Down

0 comments on commit 9185adb

Please sign in to comment.