Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

318
Visualizações
What to do to run makemigrations/migrate on heroku when deploying changed models from github?

I have deployed app from github repository to the heroku account of my customer as collaborator but this time I had to add some new models.

However I realized that when I deploy my changes from github heroku does not run makemigrations and migrate.

I I read some answers on stackoverflow and understood this is how it is supposed to be.

However my question is what should I do ? What is the best practise to deploy change models to heroku app. (I assume it is not deleting and recreating my app again since customer already has data there.)

(I am able to run makemigrations and migrate from the bash manually but when I have 30+ deployments it's a pain)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Check out the new feature on Heroku called "Release Phase": https://devcenter.heroku.com/articles/release-phase It will allow you to run migrations during the deployment. Just add whatever command you want to your Procfile, like this:

web: your_web_command
release: python manage.py migrate

The release command will run after your app is done building, and before it's launched.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda