mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Adding 'sqlmigrate' command and quote_parameter to support it.
This commit is contained in:
parent
5ca290f5db
commit
efd1e6096e
13 changed files with 169 additions and 22 deletions
|
@ -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 ...>
|
||||
--------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue