Why does Django make migrations for help_text and verbose_name changes?

后端 未结 8 2278
情深已故
情深已故 2020-12-15 15:00

When I change help_text or verbose_name for any of my model fields and run python manage.py makemigrations, it detects these changes a

8条回答
  •  粉色の甜心
    2020-12-15 15:44

    This ticket addressed the problem.

    If you have changed only help_text & django generates a new migration; then you can apply changes from latest migration to previous migration and delete the latest migration.

    Just change the help_text in the previous migration to help_text present in latest migration and delete the latest migration file. Make sure to remove corresponding *.pyc file if it is present. Otherwise an exception will be raised.

提交回复
热议问题