错误类型1:

django.db.migrations.graph.NodeNotFoundError: Migration weather.0001_initial dependencies reference nonexistent parent node (u'machines', u'0006_auto_20150921_1327')

原因:是因为修改了model中的数据,找不到之前数据迁移的节点。

解决办法:删除migrations中除init.py的所有迁移文件,重新执行makemigrations

 错误类型2:

继承了abstractbaseuser/abstracuser 后执行数据迁移报错 (fields.E304) 

解决办法:在settings.py文件中加上
AUTH_USER_MODEL = 'appname.modelname'

 

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

  未完待续,继续更新。。。

 
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄