﻿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
35274	Avoid creating index using db_index=False for a CharField which is a primary key	ChamathAilapperuma	nobody	"I'm trying to remove all the unused indexes from my db and figured that there are some primary key indexes created by Django. Following is an example for a model that I need to remove those indexes from.


{{{
class TeamName(models.Model):
    team_name = models.CharField(max_length=64, primary_key=True)
}}}


I tried adding db_index=False to above team_name field expecting it to avoid creating the index for the primary key. But it does not create a migration for this change. Thus it does not remove the corresponding index with name ending ""_like"". All of my models having CharField as primary key behaves the same."	Bug	closed	Database layer (models, ORM)	4.2	Normal	wontfix	primary_key, db_index		Unreviewed	0	0	0	0	0	0
