Hi. You should deliver migrations as part of your product and run them on production. Just like you do with collectstatic command you run migrate command.
Eventually you will have data migrations and those you can't recreate on production. Also if you recreate migrations on production again there is not easy way to reproduce same db state locally for debugging purposes. ti 2. huhtik. 2019 klo 15.51 Simon A <arriolasi...@gmail.com> kirjoitti: > There is a workflow section in the migration page from the django project > documentation. But there are somethings I am confused about, > > It says that the migrations need to be created in the non production > environment and then checked in to the repository along with the changes in > models.py. > > My question is how would that migration be applied in the production > environment. > > Once the new migrations and changes in the model are deployed in the > server, should I execute *python manage.py migrate* in the server? > > Or is it also acceptable to just deploy the changes in production > environment, then execute *makemigrations* and *migrate* in production? > > FYI, our deployment process is still a bit manual. There is a different > person handling the production servers so I'd still have to document the > deployment steps and endorse to the sysadmins that will perform the change > in the server. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/35d6d27e-6210-4c8c-b31c-2adb424b9773%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/35d6d27e-6210-4c8c-b31c-2adb424b9773%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHn91oeLZCGByk6-fw8g8hrm7WQKsE82vrNUPf0ats71NkfZ_w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.