django.db.migrations.exceptions.InconsistentMigrationHistory

后端 未结 25 1022
耶瑟儿~
耶瑟儿~ 2020-12-04 08:16

When I run python manage.py migrate on my Django project, I get the following error:

Traceback (most recent call last):
File \"manage.py\", line         


        
25条回答
  •  有刺的猬
    2020-12-04 08:50

    The order of INSTALLED_APPS seems important. If you always put your recent works on top/beginning of the list they'll always be loaded properly in regard to django.contrib.admin. Moving my works to the beginning of the INSTALLED_APPS list fixed this problem for me. The reason Kun Shi's solution may have worked maybe it ran the migrations in a different order.

提交回复
热议问题