﻿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
26034	Altering CharFields to have both db_index=True and unique=True crashes on postgresql	Karl Hobley	Tim Graham	"Hi Everyone,

If you have a CharField with db_index=True and alter it to have both ""db_index=True"" and ""unique=True"" the migration for this will not run on PostgreSQL.

Instead, you will get the following error:

    django.db.utils.ProgrammingError: relation ""app_mymodel_my_field_3922656f_like"" already exists

This bug apears to have been introduced in Django 1.8.7/1.9.1. Git bisect leads to this commit: https://github.com/django/django/commit/722fae4b5159b2810e252e3385936f86f04eb09b

I have created a test project that should hopefully help diagnosis: https://github.com/kaedroho/djangobugtest2/

Thanks,

Karl"	Bug	closed	Migrations	1.8	Release blocker	fixed			Ready for checkin	1	0	0	0	0	0
