mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #23303 -- Added BEGIN and COMMIT statements to the output of sqlmigrate.
This commit is contained in:
parent
b6aa60f425
commit
5853c87a45
7 changed files with 38 additions and 2 deletions
|
@ -285,6 +285,7 @@ This command should produce the following output:
|
|||
|
||||
.. code-block:: sql
|
||||
|
||||
BEGIN;
|
||||
CREATE TABLE "world_worldborder" (
|
||||
"id" serial NOT NULL PRIMARY KEY,
|
||||
"name" varchar(50) NOT NULL,
|
||||
|
@ -302,6 +303,7 @@ This command should produce the following output:
|
|||
)
|
||||
;
|
||||
CREATE INDEX "world_worldborder_mpoly_id" ON "world_worldborder" USING GIST ( "mpoly" );
|
||||
COMMIT;
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
|
@ -1136,6 +1136,8 @@ 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.
|
||||
|
||||
Note that ``sqlmigrate`` doesn't colorize its output.
|
||||
|
||||
The :djadminopt:`--database` option can be used to specify the database for
|
||||
which to generate the SQL.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue