dockerizing-django icon indicating copy to clipboard operation
dockerizing-django copied to clipboard

How do I run database migrations after model changes?

Open penndsg opened this issue 7 years ago • 1 comments

Thanks for this tutorial! It's very helpful.

I can't figure out how to successfully run database migration after making small changes to the model though. I put details of what I tried on this StackOverflow post. Could anyone here help me out with this? Thanks in advance!

penndsg avatar Feb 10 '18 01:02 penndsg

  1. Select the docker-machine you want to run the migrations on: eval $(docker-machine env name-of-your-machine)
  2. docker-compose exec web python web/manage.py makemigrations
  3. docker-compose exec web python web/manage.py migrate

joostslijkoort avatar Apr 06 '18 09:04 joostslijkoort