﻿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
6744	inspectdb doesn't set the primary_key/unique attribute on mixed case columns	Fabio Corneti	nobody	"I'm trying to use inspectdb with a legacy table like this in a MySQL db:

{{{
+---------------+--------------+------+-----+---------+----------------+
| Field         | Type         | Null | Key | Default | Extra          |
+---------------+--------------+------+-----+---------+----------------+
| idAnagrafica  | int(11)      | NO   | PRI | NULL    | auto_increment | 
| descrizione   | varchar(254) | YES  |     | NULL    |                | 
}}}

By default ""idAnagrafica"" is imported as ""idanagrafica"" in the resulting model, but it's not designated as the primary key because of the lookup on the schema dictionary is done using the lowercase attribute name.
The attached patch solves the issue for MySQL 5.0.



"	Bug	closed	Core (Management commands)	dev	Normal	fixed	inspectdb		Accepted	1	0	1	1	0	0
