diff --git a/django/db/backends/sqlite3/introspection.py b/django/db/backends/sqlite3/introspection.py index 55e68c34b9..6ebc572e0c 100644 --- a/django/db/backends/sqlite3/introspection.py +++ b/django/db/backends/sqlite3/introspection.py @@ -59,7 +59,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): # generation. cursor.execute(""" SELECT name FROM sqlite_master - WHERE type='table' AND NOT name='sqlite_sequence' + WHERE type in ('table', 'view') AND NOT name='sqlite_sequence' ORDER BY name""") return [row[0] for row in cursor.fetchall()]