Django

Code

Changeset 3137

Show
Ignore:
Timestamp:
06/16/06 21:32:50 (2 years ago)
Author:
mtredinnick
Message:

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.

Files:

Legend:

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

    r3132 r3137  
    406406----------------------------------------------------------- 
    407407 
    408 If you don't mind clearing data, just pipe the output of the appropriate 
    409 ``manage.py sqlreset`` command into your database's command-line utility. 
    410 For example:: 
    411  
    412     manage.py sqlreset appname | manage.py dbshell 
    413  
    414 ``manage.py sqlreset`` outputs SQL that clears the app's database 
    415 table(s) and creates new ones. The above command uses a Unix pipe to send the 
    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``). 
     408If you don't mind clearing data, your project's ``manage.py`` utility has an 
     409option to reset the SQL for a particular application:: 
     410 
     411    manage.py reset appname 
     412 
     413This drops any tables associated with ``appname`` and recreates them. 
    419414 
    420415If you do care about deleting data, you'll have to execute the ``ALTER TABLE``