Fixed #5086 -- The 'flush' and 'sqlflush' management commands no longer touch tables that Django is not aware of (tables that are not in INSTALLED_APPS and/or do not have associated models. Thanks for bringing this up, shaun@cuttshome.net

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-08-25 19:32:30 +00:00
parent 8b8a36c7d0
commit 132605d889
4 changed files with 50 additions and 9 deletions

View file

@ -124,6 +124,13 @@ executed. This means that all data will be removed from the database, any
post-synchronization handlers will be re-executed, and the ``initial_data``
fixture will be re-installed.
The behavior of this command has changed in the Django development version.
Previously, this command cleared *every* table in the database, including any
table that Django didn't know about (i.e., tables that didn't have associated
models and/or weren't in ``INSTALLED_APPS``). Now, the command only clears
tables that are represented by Django models and are activated in
``INSTALLED_APPS``.
inspectdb
---------
@ -240,6 +247,7 @@ Executes the equivalent of ``sqlreset`` for the given appnames.
runfcgi [options]
-----------------
Starts a set of FastCGI processes suitable for use with any web server
which supports the FastCGI protocol. See the `FastCGI deployment
documentation`_ for details. Requires the Python FastCGI module from
@ -337,7 +345,7 @@ Refer to the description of ``sqlcustom`` for an explanation of how to
specify initial data.
sqlclear [appname appname ...]
--------------------------------------
------------------------------
Prints the DROP TABLE SQL statements for the given appnames.
@ -360,18 +368,23 @@ table modifications, or insert any SQL functions into the database.
Note that the order in which the SQL files are processed is undefined.
sqlflush
--------
Prints the SQL statements that would be executed for the `flush`_ command.
sqlindexes [appname appname ...]
----------------------------------------
--------------------------------
Prints the CREATE INDEX SQL statements for the given appnames.
sqlreset [appname appname ...]
--------------------------------------
------------------------------
Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given appnames.
sqlsequencereset [appname appname ...]
----------------------------------------------
--------------------------------------
Prints the SQL statements for resetting sequences for the given
appnames.