From efd1e6096ee87fe332cf989ba5479e9461d0fb3a Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Fri, 6 Sep 2013 15:27:51 -0500 Subject: Adding 'sqlmigrate' command and quote_parameter to support it. --- docs/ref/django-admin.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs') diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 62058e22d9..93fc4de4ab 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -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 +------------------------------------ + +.. 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 -------------------------------------- -- cgit v1.3