south migration: “database backend does not accept 0 as a value for AutoField” (mysql)

后端 未结 4 668
心在旅途
心在旅途 2021-02-18 19:19

I\'m new to django and trying to have a Foreign key back to users for an assignee and reporter. But when i\'m trying to apply the change with South i get the error



        
4条回答
  •  不知归路
    2021-02-18 20:05

    I got the same error after upgrading to django 1.7.1 it was caused when saving a model that had a foreign key to another model that for some reason had an id starting auto increment with 0, i guess this was allowed in previous django versions, but not now.

提交回复
热议问题