﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
14651	ignored field index creation for fields with unique=True and db_index=True	jordi	nobody	"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.


"		closed	Database layer (models, ORM)	1.2		invalid			Unreviewed	0	0	0	0	0	0
