diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2017-06-06 14:25:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-06 14:25:53 +0200 |
| commit | 5e9f7f1e1c15804b761a0adfa523d53531ef5635 (patch) | |
| tree | 95c1aaa9d491d83f86347fc9e91590775797b1ab | |
| parent | 4ad2f862844d35404e4798b3227517625210a72e (diff) | |
Refs #20483 -- Removed unneeded column from _foreign_key_constraints() on Oracle.
| -rw-r--r-- | django/db/backends/oracle/operations.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/django/db/backends/oracle/operations.py b/django/db/backends/oracle/operations.py index 992d7810b4..0ee0fbf0fe 100644 --- a/django/db/backends/oracle/operations.py +++ b/django/db/backends/oracle/operations.py @@ -295,7 +295,7 @@ END; if recursive: cursor.execute(""" SELECT - user_tables.table_name, rcons.constraint_name, MAX(level) + user_tables.table_name, rcons.constraint_name FROM user_tables JOIN @@ -314,16 +314,14 @@ END; else: cursor.execute(""" SELECT - cons.table_name, cons.constraint_name, 1 + cons.table_name, cons.constraint_name FROM user_constraints cons WHERE cons.constraint_type = 'R' AND cons.table_name = UPPER(%s) """, (table_name,)) - return [ - (foreign_table, constraint) for foreign_table, constraint, _ in cursor.fetchall() - ] + return cursor.fetchall() def sql_flush(self, style, tables, sequences, allow_cascade=False): if tables: |
