﻿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
25412	Migrate command does not create index with operator class for CharField	Federico Frenguelli	Federico Frenguelli	"`./manage.py migrate` command does not create an additional index with the operator class for a CharField, when `db_index=True` is added to an existing field.

I created a sample project to reproduce the error here: https://github.com/synasius/foo

There are two models, `Person` and `Car`. 
`Person`'s ""name"" field was migrated with `db_index=True` and if I run  `./manage.py sqlmigrate bar 0001` I can see both the indexes, one using the operator class `varchar_pattern_ops`.

The issue occurs when `db_index=True` is added to `Car`'s name field and then a migration is created. When I run `./manage.py sqlmigrate bar 0002` I can only see one plain index.

I reproduced the issue in Django 1.7.x, 1.8.x and master. I'm using postgresql 9.4.4.


"	Bug	closed	Migrations	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
