Code

Ticket #13565: 13565.diff

File 13565.diff, 730 bytes (added by ikelly, 4 years ago)
Line 
1Index: django/db/backends/oracle/introspection.py
2===================================================================
3--- django/db/backends/oracle/introspection.py  (revision 13861)
4+++ django/db/backends/oracle/introspection.py  (working copy)
5@@ -39,7 +39,12 @@
6 
7     def get_table_list(self, cursor):
8         "Returns a list of table names in the current database."
9-        cursor.execute("SELECT TABLE_NAME FROM USER_TABLES")
10+        cursor.execute("""
11+    SELECT TABLE_NAME FROM USER_TABLES
12+    UNION
13+    SELECT VIEW_NAME FROM USER_VIEWS
14+    UNION
15+    SELECT SYNONYM_NAME FROM USER_SYNONYMS""")
16         return [row[0].lower() for row in cursor.fetchall()]
17 
18     def get_table_description(self, cursor, table_name):