summaryrefslogtreecommitdiff
path: root/docs/faq.txt
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-06-16 13:37:26 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-06-16 13:37:26 +0000
commitcc56d65c6e0de167101ae0de4416c3e3e92bbef5 (patch)
tree0de17c8888dbec7ccf808122065662bc3445868c /docs/faq.txt
parent062bae3bb3d6ff410a0e903543a51c1d22ae17f0 (diff)
Fixed #2166 - Use "manage.py dbshell" as the portable way to pipe commands to
the database. Thanks Paolo. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/faq.txt')
-rw-r--r--docs/faq.txt14
1 files changed, 6 insertions, 8 deletions
diff --git a/docs/faq.txt b/docs/faq.txt
index 0749fb15b7..03cf05ef2f 100644
--- a/docs/faq.txt
+++ b/docs/faq.txt
@@ -406,18 +406,16 @@ 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
-``django-admin.py sqlreset`` command into your database's command-line utility.
+``manage.py sqlreset`` command into your database's command-line utility.
For example::
- django-admin.py sqlreset appname | psql dbname
+ manage.py sqlreset appname | manage.py dbshell
-That "psql" assumes you're using PostgreSQL. If you're using MySQL, use the
-appropriate command-line utility, ``mysql``.
-
-``django-admin.py sqlreset`` outputs SQL that clears the app's database
+``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 PostgreSQL command-line utility, which accepts SQL as
-input.
+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``).
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,