diff options
| author | Alfred Perlstein <alfred@freebsd.org> | 2014-12-31 19:16:51 -0800 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-01-03 12:06:40 -0500 |
| commit | db3f7c15cbf4c9025e83065d1302d0e61d570331 (patch) | |
| tree | aed67e0f5c61d4628b8f8057769d6d7366872a82 /docs/ref/schema-editor.txt | |
| parent | b738178825ec9378198d77ac69699513774f0884 (diff) | |
Fixed #23749 -- Documented how to use the database alias in RunPython.
Thanks Markus Holtermann for review and feedback.
Diffstat (limited to 'docs/ref/schema-editor.txt')
| -rw-r--r-- | docs/ref/schema-editor.txt | 17 |
1 files changed, 17 insertions, 0 deletions
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 <data-migrations-and-multiple-databases>`. |
