Gho*_*r21 19 django django-south
当我使用Django South删除NOT NULL字段时,我收到以下消息:
? The field 'VisitOrder.end_date' does not have a default specified, yet is NOT NULL. ? Since you are removing this field, you MUST specify a default ? value to use for existing rows. Would you like to: ? 1. Quit now, and add a default to the field in models.py ? 2. Specify a one-off value to use for existing columns now ? 3. Disable the backwards migration by raising an exception. ? Please select a choice:
为什么南方需要这个,因为它无论如何都会移除这个领域?
Gar*_*yde 33
Django South允许您通过迁移向前或向后移动.因此,如果您决定撤消迁移,South将重新创建已删除的字段.这就是为什么South询问您是否要指定默认值或" 通过引发异常来禁用向后迁移"的原因.
| 归档时间: |
|
| 查看次数: |
3510 次 |
| 最近记录: |