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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.