Adding 'sqlmigrate' command and quote_parameter to support it.

This commit is contained in:
Andrew Godwin 2013-09-06 15:27:51 -05:00
parent 5ca290f5db
commit efd1e6096e
13 changed files with 169 additions and 22 deletions

View file

@ -993,6 +993,24 @@ Prints the CREATE INDEX SQL statements for the given app name(s).
The :djadminopt:`--database` option can be used to specify the database for
which to print the SQL.
sqlmigrate <appname> <migrationname>
------------------------------------
.. django-admin:: sqlmigrate
Prints the SQL for the named migration. This requires an active database
connection, which it will use to resolve constraint names; this means you must
generate the SQL against a copy of the database you wish to later apply it on.
The :djadminopt:`--database` option can be used to specify the database for
which to generate the SQL.
.. django-admin-option:: --backwards
By default, the SQL created is for running the migration in the forwards
direction. Pass ``--backwards`` to generate the SQL for
un-applying the migration instead.
sqlsequencereset <appname appname ...>
--------------------------------------