#25694: Migrate command creates a default index for a CharField with a wrong
'_uniq' suffix in the name
----------------------------+------------------------------------
     Reporter:  synasius    |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  1.8
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  1           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  1
Easy pickings:  0           |                    UI/UX:  0
----------------------------+------------------------------------

Comment (by MarkusH):

 Replying to [comment:5 jdufresne]:
 > > How do you suggest to take care of existing indexes that would now
 need to be renamed?
 >
 > Is this a required component of this bug fix?

 Yes. If we suddenly end up with either 2 indexes on a field applications
 become slow. And, if not handled correctly, when we have 2 indexes on a
 field and only drop 1 we might not be able to drop the field given a stale
 index.

 > With the current implementation, migrations don't actually care about
 the name of the index. It is just for human aesthetics. When removing an
 index, Django will remove all non-unique indexes regardless of the name. I
 actually bumped into this while working on another ticket and thought it
 would be a quick fix.

 So, you're saying Django already dropps all indexes on a field. Good. That
 makes the proposal redundant.

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

Reply via email to