diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2006-06-17 02:32:50 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2006-06-17 02:32:50 +0000 |
| commit | 4540a85ddabd9303955b88f5f727a7ede6161253 (patch) | |
| tree | c03c8b4532c2202fd1edbf7a4eea0a8a05856178 /docs/faq.txt | |
| parent | d599052a159454e33c44d9786f36189285d6c8ca (diff) | |
Fixed #2166 -- (take two!). Use "manage.py reset ..." to reset a model's
database tables, not the older piped combination that used to be required.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/faq.txt')
| -rw-r--r-- | docs/faq.txt | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/docs/faq.txt b/docs/faq.txt index 03cf05ef2f..5c522cbb06 100644 --- a/docs/faq.txt +++ b/docs/faq.txt @@ -405,17 +405,12 @@ Using a ``FileField`` or an ``ImageField`` in a model takes a few steps: If I make changes to a model, how do I update the database? ----------------------------------------------------------- -If you don't mind clearing data, just pipe the output of the appropriate -``manage.py sqlreset`` command into your database's command-line utility. -For example:: +If you don't mind clearing data, your project's ``manage.py`` utility has an +option to reset the SQL for a particular application:: - manage.py sqlreset appname | manage.py dbshell + manage.py reset appname -``manage.py sqlreset`` outputs SQL that clears the app's database -table(s) and creates new ones. The above command uses a Unix pipe to send the -SQL directly to the database command-line utility, which accepts SQL as -input (``manage.py dbshell`` will launch the appropriate tool for the database -configured in ``settings.py``). +This drops any tables associated with ``appname`` and recreates them. If you do care about deleting data, you'll have to execute the ``ALTER TABLE`` statements manually in your database. That's the way we've always done it, |
