﻿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
24407	Initial migration fails if app name has upper-case letters on Oracle	Carsten Fuchs	nobody	"In a Django project that was created pre-1.7, did ''not'' use South before and was recently upgraded to Django 1.7.4 and is otherwise fine, I was trying to convert it to use migrations, following the docs at https://docs.djangoproject.com/en/1.7/topics/migrations/#adding-migrations-to-apps

Creating the initial migrations with `makemigrations` went well, but the first run of `migrate` aborted with error ""django.db.utils.DatabaseError: ORA-00955: name is already used by an existing object"". Please see my post to django-users at https://groups.google.com/forum/#!topic/django-users/lVS24BGFouo for details.

Debugging this quickly brought me to `MigrationExecutor.detect_soft_applied()` in `django/db/migrations/executor.py`, whose lines 153 to 154 say:

{{{
#!python
                if model._meta.db_table not in self.connection.introspection.get_table_list(self.connection.cursor()):
                    return False
}}}

It seems that `get_table_list()` returns all lower-case list items, whereas `model._meta.db_table` was, in my case, ""Lori_aub"". Consequently, `False` was wrongly returned.

Adding `lower()`, i.e. changing this to

{{{
#!python
                if model._meta.db_table.lower() not in self.connection.introspection.get_table_list(self.connection.cursor()):
                    return False
}}}

entirely fixed the problem for me!  :-)

(Sorry for not having a PR readily available.)
"	Bug	closed	Migrations	1.7	Normal	fixed	oracle		Accepted	0	0	0	0	0	0
