Refs #20483 -- Removed unneeded column from _foreign_key_constraints() on Oracle.

This commit is contained in:
Mariusz Felisiak 2017-06-06 14:25:53 +02:00 committed by GitHub
parent 4ad2f86284
commit 5e9f7f1e1c
1 changed files with 3 additions and 5 deletions

View File

@ -295,7 +295,7 @@ END;
if recursive: if recursive:
cursor.execute(""" cursor.execute("""
SELECT SELECT
user_tables.table_name, rcons.constraint_name, MAX(level) user_tables.table_name, rcons.constraint_name
FROM FROM
user_tables user_tables
JOIN JOIN
@ -314,16 +314,14 @@ END;
else: else:
cursor.execute(""" cursor.execute("""
SELECT SELECT
cons.table_name, cons.constraint_name, 1 cons.table_name, cons.constraint_name
FROM FROM
user_constraints cons user_constraints cons
WHERE WHERE
cons.constraint_type = 'R' cons.constraint_type = 'R'
AND cons.table_name = UPPER(%s) AND cons.table_name = UPPER(%s)
""", (table_name,)) """, (table_name,))
return [ return cursor.fetchall()
(foreign_table, constraint) for foreign_table, constraint, _ in cursor.fetchall()
]
def sql_flush(self, style, tables, sequences, allow_cascade=False): def sql_flush(self, style, tables, sequences, allow_cascade=False):
if tables: if tables: