Django Book 翻译
菜单>:
TOC
返回
原文:
However, theres a bit of a chicken-and-egg problem here, because in order to know how the new database column should be expressed in SQL, you need to look at the output of Djangos ``manage.py sqlall`` command, which requires that the field exist in the model. (Note that youre not *required* to create your column with exactly the same SQL that Django would, but its a good idea to do so, just to be sure everythings in sync.)
翻译:
然而,这里总是存在先有鸡还是先有蛋的问题,为了弄清新的数据列怎么用SQL描述,你需要查看 ``manage.py sqlall`` 的执行结果,它列出了模型中已经存在的字段。(注意:你不需要像Django中的SQL一模一样的创建你的列,但是这确实是一个好主意,从而保证所有都是同步的)
备注:
译者: