summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2014-08-16 17:21:14 +0200
committerBaptiste Mispelon <bmispelon@gmail.com>2014-08-18 19:36:34 +0200
commit3a80189479a29220bac6d205a1b97184bd76a876 (patch)
tree308dac3d060cb4b1bbbe7b78fbd576273fbdd0ec /docs
parent126606c5b8499830cd56cbe632f6af17bc7471ea (diff)
[1.7.x] Fixed #23303 -- Added BEGIN and COMMIT statements to the output of sqlmigrate.
Backport of 5853c87a458f62ebd62d7809168355610de2570c from master. Conflicts: django/core/management/commands/sqlmigrate.py tests/user_commands/tests.py
Diffstat (limited to 'docs')
-rw-r--r--docs/intro/tutorial01.txt2
-rw-r--r--docs/ref/contrib/gis/tutorial.txt2
-rw-r--r--docs/ref/django-admin.txt2
3 files changed, 6 insertions, 0 deletions
diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt
index 5ac9fbb12c..1641ed2e17 100644
--- a/docs/intro/tutorial01.txt
+++ b/docs/intro/tutorial01.txt
@@ -480,6 +480,7 @@ readability):
.. code-block:: sql
+ BEGIN;
CREATE TABLE polls_question (
"id" serial NOT NULL PRIMARY KEY,
"question_text" varchar(200) NOT NULL,
@@ -500,6 +501,7 @@ readability):
FOREIGN KEY ("question_id")
REFERENCES "polls_question" ("id")
DEFERRABLE INITIALLY DEFERRED;
+ COMMIT;
Note the following:
diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt
index 339c9a481e..327427e94c 100644
--- a/docs/ref/contrib/gis/tutorial.txt
+++ b/docs/ref/contrib/gis/tutorial.txt
@@ -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::
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index 03fbef028f..7d464d92d4 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -1127,6 +1127,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.