#22125: Unnecessary creation of index for ManyToManyField
-------------------------------------+-------------------------------------
     Reporter:  tbhtan3@…            |                    Owner:  bwreilly
         Type:                       |                   Status:  closed
  Cleanup/optimization               |                  Version:  1.6
    Component:  Database layer       |               Resolution:  needsinfo
  (models, ORM)                      |             Triage Stage:
     Severity:  Normal               |  Unreviewed
     Keywords:                       |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  1                    |
-------------------------------------+-------------------------------------

Comment (by bwreilly):

 I've confirmed PostgreSQL and SQLite both exhibit this behavior
 ([https://gist.github.com/anonymous/9575316 Gist]), I'll check MySQL when
 I get a chance. I don't have access to an Oracle instance, but I'll check
 their documentation.

 Additionally, I've fixed the issue with `unique_together=[('a','b','c')]`,
 added tests, and moved the functionality to an overridable method
 ([https://github.com/OneOcean/django/compare/django:master...master
 compare]). Sorry it isn't a pull request at the moment, I'm going to fix
 that Monday.

 Besides [https://docs.djangoproject.com/en/dev/ref/models/options/#unique-
 together Model Meta options unique_together] and
 [https://docs.djangoproject.com/en/dev/ref/models/fields/#db-index Fields
 db_index], should I update the documentation anywhere else?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22125#comment:8>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/075.7acbb5fdd8857b542554bf6e9e99b0a6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to