Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2166 - Use "manage.py dbshell" as the portable way to pipe com…

…mands to

the database. Thanks Paolo.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit cc56d65c6e0de167101ae0de4416c3e3e92bbef5 1 parent 062bae3
Malcolm Tredinnick authored

Showing 1 changed file with 6 additions and 8 deletions. Show diff stats Hide diff stats

  1. 14  docs/faq.txt
14  docs/faq.txt
@@ -406,18 +406,16 @@ If I make changes to a model, how do I update the database?
406 406
 -----------------------------------------------------------
407 407
 
408 408
 If you don't mind clearing data, just pipe the output of the appropriate
409  
-``django-admin.py sqlreset`` command into your database's command-line utility.
  409
+``manage.py sqlreset`` command into your database's command-line utility.
410 410
 For example::
411 411
 
412  
-    django-admin.py sqlreset appname | psql dbname
  412
+    manage.py sqlreset appname | manage.py dbshell
413 413
 
414  
-That "psql" assumes you're using PostgreSQL. If you're using MySQL, use the
415  
-appropriate command-line utility, ``mysql``.
416  
-
417  
-``django-admin.py sqlreset`` outputs SQL that clears the app's database
  414
+``manage.py sqlreset`` outputs SQL that clears the app's database
418 415
 table(s) and creates new ones. The above command uses a Unix pipe to send the
419  
-SQL directly to the PostgreSQL command-line utility, which accepts SQL as
420  
-input.
  416
+SQL directly to the database command-line utility, which accepts SQL as
  417
+input (``manage.py dbshell`` will launch the appropriate tool for the database
  418
+configured in ``settings.py``).
421 419
 
422 420
 If you do care about deleting data, you'll have to execute the ``ALTER TABLE``
423 421
 statements manually in your database. That's the way we've always done it,

0 notes on commit cc56d65

Please sign in to comment.
Something went wrong with that request. Please try again.