Refs #27324 -- Optimized DatabaseIntrospection.get_constraints() for foreign keys on Oracle.
This commit is contained in:
parent
d4822148d0
commit
2d259e6bad
|
@ -220,14 +220,12 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
||||||
SELECT
|
SELECT
|
||||||
cons.constraint_name,
|
cons.constraint_name,
|
||||||
LOWER(cols.column_name) AS column_name,
|
LOWER(cols.column_name) AS column_name,
|
||||||
LOWER(rcons.table_name),
|
LOWER(rcols.table_name),
|
||||||
LOWER(rcols.column_name)
|
LOWER(rcols.column_name)
|
||||||
FROM
|
FROM
|
||||||
user_constraints cons
|
user_constraints cons
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
user_constraints rcons ON cons.r_constraint_name = rcons.constraint_name
|
user_cons_columns rcols ON rcols.constraint_name = cons.r_constraint_name
|
||||||
INNER JOIN
|
|
||||||
user_cons_columns rcols ON rcols.constraint_name = rcons.constraint_name
|
|
||||||
LEFT OUTER JOIN
|
LEFT OUTER JOIN
|
||||||
user_cons_columns cols ON cons.constraint_name = cols.constraint_name
|
user_cons_columns cols ON cons.constraint_name = cols.constraint_name
|
||||||
WHERE
|
WHERE
|
||||||
|
|
Loading…
Reference in New Issue