﻿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
29808	Applied migration detection may fail when using a case-insensitive collation	Elaci0	Hasan Ramezani	"Hello, 
I'm using this guide  https://datascience.blog.wzb.eu/2017/03/21/using-django-with-an-existinglegacy-database for my studies with camelCasing together with Django (yes, I'm still trying to keep the naming convention we have inside our DB, also for the model's names)

Now, I'm really new to Django and I don't know if it's intended but this part of code inside `django/db/migrations/executor.py`' is doing case sensitive comparison to check if a column is already present in a database
{{{
column_names = [
    column.name for column in
    self.connection.introspection.get_table_description(self.connection.cursor(), table)
]
if field.column not in column_names:
    return False, project_state
}}}

so if my migration file contains something like this
{{{
        migrations.AddField(
            model_name='city',
            name='countrycode',
            field=models.ForeignKey(db_column='countryCode', on_delete=django.db.models.deletion.CASCADE, to='my_DB.country'),
}}}

and I run `python3 manage.py migrate --database my_DB --fake-initial my_first_app`

it fires  an error saying that that table already exists 
`django.db.utils.OperationalError: (1050, ""Table 'city' already exists"")`

If I run `python3 manage.py migrate --database my_DB --fake my_first_app`  it correctly fakes  my_first_app
The  my_DB  collation is case insensitive, while MySql is running with the  `' --lower-case-table-names=0`'   option"	Bug	closed	Migrations	dev	Normal	fixed	migration fake-initial case sensitive		Accepted	1	0	0	0	0	0
