#14651: ignored field index creation for fields with unique=True and 
db_index=True
------------------------------------------+---------------------------------
 Reporter:  jordi                         |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.2       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 If I have a field in my model like;
 field = models.CharField(max_length=4, unique=True, db_index=True)

 function sql_indexes_for_field from db/backends/creation.py will silently
 ignore creation the index for that field.

 I think it show be created or, at least, give a message that it will not
 be created and some reason.

 To create an index for such a field I have to remove "unique=True", create
 the index whith "python manage.py sqlindexes <app>" and after add again
 "unique=True", so django admin captures
 non unique entries. I am using sqlite.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14651>
Django <http://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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to