Fixed #23303 -- Added BEGIN and COMMIT statements to the output of sqlmigrate.

This commit is contained in:
Baptiste Mispelon 2014-08-16 17:21:14 +02:00
parent b6aa60f425
commit 5853c87a45
7 changed files with 38 additions and 2 deletions

View file

@ -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::

View file

@ -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.