Why does django 1.7 creates migrations for changes in field choices?

前端 未结 2 1470
心在旅途
心在旅途 2021-01-03 18:36

I have observed this behaviour on version 1.7 but not in previous versions using south migration.

eg.

class RedemptionCode(models.Model):
    EXPIRE         


        
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-03 19:32

    After raised the ticket and got closed due to duplication, finally found the answer:

    This is by design. There are several reasons, not least of which for me that datamigrations at points in history need to have a full accurate representation of the models, including all their options not just those which affect the database.

    Reference:

    • https://code.djangoproject.com/ticket/22837
    • https://code.djangoproject.com/ticket/23581

提交回复
热议问题