Running database migrations

We are still receiving errors about missing tables, and the reason is because we have not run database migrations to establish the required database schema the application expects to be in place. Recall that we used the python3 manage.py migrate command locally to run these migrations, so we need to do the same in our Docker environment.

If you tear down the environment again by pressing Ctrl + C and running docker-compose down -v, one approach would be to use the docker-compose run command:

> docker-compose down -v......> docker-compose run release python3 manage.py migrateCreating network "todobackend_default" with the default driverCreating todobackend_db_1 ... doneTraceback (most recent call last): File "/usr/lib/python3.6/site-packages/mysql/connector/network.py", ...

Get Docker on Amazon Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.