Django

Code

Changeset 3132

Show
Ignore:
Timestamp:
06/16/06 08:37:26 (2 years ago)
Author:
mtredinnick
Message:

Fixed #2166 - Use "manage.py dbshell" as the portable way to pipe commands to
the database. Thanks Paolo.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/faq.txt

    r3105 r3132  
    407407 
    408408If 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. 
    410410For example:: 
    411411 
    412     django-admin.py sqlreset appname | psql dbname 
    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 
     412    manage.py sqlreset appname | manage.py dbshell 
     413 
     414``manage.py sqlreset`` outputs SQL that clears the app's database 
    418415table(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. 
     416SQL directly to the database command-line utility, which accepts SQL as 
     417input (``manage.py dbshell`` will launch the appropriate tool for the database 
     418configured in ``settings.py``). 
    421419 
    422420If you do care about deleting data, you'll have to execute the ``ALTER TABLE``