Skip to content
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

How do I run database migrations after model changes? #50

Open
penndsg opened this issue Feb 10, 2018 · 1 comment
Open

How do I run database migrations after model changes? #50

penndsg opened this issue Feb 10, 2018 · 1 comment

Comments

@penndsg
Copy link

penndsg commented Feb 10, 2018

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!

@joostslijkoort
Copy link

joostslijkoort commented Apr 6, 2018

  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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants