现象:python python manage.py migrate 后
提示:Running migrations: No migrations to apply.
解决方法:
找到相应数据库的数据库表django_migrations,之后有一个app字段为goods的名字:
删除这条记录,之后再重新执行数据迁移命令,前提是你已经生成了0001_initial.py这个文件。
最后,数据库表就会重新建立在数据库中。
注:我这里的goods是你们相应的出错的app的名字,哪个app出错,就删除哪个。
不成功的话左侧migrations文件下的0001_initial.py文件也要删除
然后重新执行数据迁移。
(由于在django_migrations表中数据删除错误,我是重新建库新增的 以上的问题需验证 )
标签:No,migrate,数据库,migrations,django,apply From: https://www.cnblogs.com/zs0621/p/16735713.html