Should Django Migration (makemigrations) commited separately than creating model?

混江龙づ霸主 提交于 2019-12-11 17:55:39

问题


It's vague for me which strategy is better in Version controlling of django or any other web framework:

  1. Commit separately for creating model and running makemigrations.
  2. Commit both tasks together.

I think myself first strategy is better, because of migration files which creating after running makemigrations. But I need to be sure which one in better. Is there any certain standard for this?


回答1:


Both the strategies you list can work. But option one is better.

You can commit Django Migration separate with other changes, so that changes for models can be tracked more clearly from commit histories.



来源:https://stackoverflow.com/questions/50939925/should-django-migration-makemigrations-commited-separately-than-creating-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!