1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

[1.2.X] Fixed a case-sensitivity bug in Oracle introspection that was preventing inspectdb from identifying foreign keys.

Backport of r15785 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly 2011-03-09 19:41:33 +00:00
parent 4c152afbb6
commit 76636c81cd

View File

@ -66,6 +66,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
Returns a dictionary of {field_index: (field_index_other_table, other_table)} Returns a dictionary of {field_index: (field_index_other_table, other_table)}
representing all relationships to the given table. Indexes are 0-based. representing all relationships to the given table. Indexes are 0-based.
""" """
table_name = table_name.upper()
cursor.execute(""" cursor.execute("""
SELECT ta.column_id - 1, tb.table_name, tb.column_id - 1 SELECT ta.column_id - 1, tb.table_name, tb.column_id - 1
FROM user_constraints, USER_CONS_COLUMNS ca, USER_CONS_COLUMNS cb, FROM user_constraints, USER_CONS_COLUMNS ca, USER_CONS_COLUMNS cb,