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

后端 未结 4 2146
轮回少年
轮回少年 2021-02-18 19:38

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:12

    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.

提交回复
热议问题