注意: 下边方法的缺省值,在生产服务器,不存在的话,会报错,
我今天就遇到这种情况,所以以后在更新库表的时候,尽量少更新步骤,
我的解决办法是: 手动在数据表中生成一个相同ID的数据,
今天的情况比较极端, 关联的表,是个空表,如果是一起的一个已经有数据的,也不太会有这个错误情况出现
================================================
You are trying to add a non-nullable field 'CreateUser' to hpost without a default; we can't do that (the database needs something to populate existing rows).
Please select a fix:
1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
2) Quit, and let me add a default in models.py
关于这个问题,网上有说, 把所有数据表文件,清空