django同步数据库报错:django.db.utils.OperationalError: (1050, "Table 'blog_readnum' already exists")
同步数据库报错:django.db.utils.OperationalError: (1050, "Table 'blog_readnum' already exists")
1.报错原因:自己更改了数据库表的字段名称或者删除了表,同步时提示报错:django.db.utils.OperationalError: (1050, "Table 'blog_readnum' already exists")
2.解决办法:输入命令: python manage.py migrate myapp --fake # myapp(要执行的app名称)
本文来自博客园,作者:浪里小白龙qaq,转载请注明原文链接:https://www.cnblogs.com/xiao-bai-long/p/13748867.html