From 5b522cd85a63cf5e352c500447aa91002e83845e Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 19 Aug 2013 13:12:48 +0100 Subject: [PATCH] Minor oracle fixes --- django/db/backends/oracle/introspection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/db/backends/oracle/introspection.py b/django/db/backends/oracle/introspection.py index e4ef1ae81b..70c38c8de8 100644 --- a/django/db/backends/oracle/introspection.py +++ b/django/db/backends/oracle/introspection.py @@ -180,7 +180,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): "unique": unique, "foreign_key": None, "check": check, - "index": True, + "index": True, # All P and U come with index, see inner join above } # Record the details constraints[constraint]['columns'].append(column) @@ -258,6 +258,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): FROM user_constraints cons WHERE cols.index_name = cons.index_name ) + ORDER BY cols.column_position """, [table_name]) for constraint, column in cursor.fetchall(): # If we're the first column, make the record