Django Book 翻译
菜单>:
TOC
返回
原文:
The ``syncdb`` command is a simple sync of your models to your database. It looks at all of the models in each app in your ``INSTALLED_APPS`` setting, checks the database to see whether the appropriate tables exist yet, and creates the tables if they dont yet exist. Note that ``syncdb`` does *not* sync changes in models or deletions of models; if you make a change to a model or delete a model, and you want to update the database, ``syncdb`` will not handle that. (More on this later.)
翻译:
``syncdb`` 命令是同步你的模型到数据库的一个简单方法。它会根据 ``INSTALLED_APPS`` 里设置的app来检查数据库, 如果表不存在,它就会创建它。 需要注意的是, ``syncdb`` 并 *不能* 同步模型的修改到数据库。如果你修改了模型,然后你想更新 数据库, ``syncdb`` 是帮不了你的。(稍后我们再讲这些。)
备注:
译者: