報錯: You are trying to add a non-nullable field 'BookName' to BookInfo without a default; we can't do that (the database needs something to populate ex ...
報錯:
You are trying to add a non-nullable field 'BookName' to BookInfo 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)
2) Quit, and let me add a default in models.py
原因:
在模型類中添加了一個非空欄位,而該模型類對應的表中,已經存在數據,而這些現存的數據並沒有新增欄位的值