#28339: Expand the docs around how sqlmigrate works with regards to constraint 
and
index names
--------------------------------------+------------------------------------
     Reporter:  Craig de Stigter      |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  1.11
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

 * component:  Migrations => Documentation
 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 I think the constraint and index names generated by Django aren't
 necessarily the same across different versions -- that's probably why
 introspection is used. [https://docs.djangoproject.com/en/dev/ref/django-
 admin/#django-admin-sqlmigrate As the documentation for sqlmigrate] says,

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

 See also bugs like #23577 which cause names to get out of sync with that
 Django initially generated (and #27064).

 I'm not sure if anything can be done besides improving the documentation
 of these limitations.

--
Ticket URL: <https://code.djangoproject.com/ticket/28339#comment:7>
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/065.ba9c05fd4f0c5ec5d8f8c64eade55b9f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to