Django Book 翻译
菜单>:
TOC
返回
原文:
Not only are these lines redundant, but also they can cause problems if your application will be adding *new* records to these tables. The ``inspectdb`` command cannot detect whether a field is autoincremented, so its up to you to change this to ``AutoField`` , if necessary.
翻译:
这样做并不是仅仅因为这些行是冗余的,而且如果当你的应用需要向这些表中增加新记录时,这些行会导致某些问题。而inspectdb命令并不能检测出一个字段是否自增长的,因此必要的时候,你必须将他们修改为AutoField.
备注:
译者: