From db3f7c15cbf4c9025e83065d1302d0e61d570331 Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Wed, 31 Dec 2014 19:16:51 -0800 Subject: Fixed #23749 -- Documented how to use the database alias in RunPython. Thanks Markus Holtermann for review and feedback. --- docs/ref/schema-editor.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'docs/ref') diff --git a/docs/ref/schema-editor.txt b/docs/ref/schema-editor.txt index e4d3fa01c0..94456d060e 100644 --- a/docs/ref/schema-editor.txt +++ b/docs/ref/schema-editor.txt @@ -149,3 +149,20 @@ If the database has the ``supports_combined_alters``, Django will try and do as many of these in a single database call as possible; otherwise, it will issue a separate ALTER statement for each change, but will not issue ALTERs where no change is required (as South often did). + +Attributes +========== + +All attributes should be considered read-only unless stated otherwise. + +connection +---------- + +.. attribute:: SchemaEditor.connection + +A connection object to the database. A useful attribute of the connection is +``alias`` which can be used to determine the name of the database being +accessed. + +This is useful when doing data migrations for :ref:`migrations with multiple +databases `. -- cgit v1.3