#23749: Document how to get the database alias in migrations
--------------------------------------+------------------------------------
     Reporter:  alfredperlstein       |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  1.7
     Severity:  Normal                |               Resolution:
     Keywords:  migrations dbrouter   |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  1                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by iambibhas):

 I just verified that `schema_editor.connection.alias` does return the
 current connection in use, even when `--database=foobar` is used. We could
 mention this in the
 [https://docs.djangoproject.com/en/1.7/topics/migrations/#data-migrations
 data migration doc] and/or the [https://docs.djangoproject.com/en/1.7/ref
 /schema-editor/ `SchemaEditor` doc]. `SchemaEditor` doc could use a
 `Properties` section along with the `Methods` section.

--
Ticket URL: <https://code.djangoproject.com/ticket/23749#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.b748e4e75203a58fd467ba0e1ad4bd4e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to