1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Fixed #24637 -- Fixed database introspection with SQLite 3.8.9.

This commit is contained in:
peterfarrell 2015-04-13 16:54:04 -04:00 committed by Tim Graham
parent b333d10618
commit f8e8853b51
4 changed files with 16 additions and 1 deletions

View File

@ -239,7 +239,10 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
constraints = {}
# Get the index info
cursor.execute("PRAGMA index_list(%s)" % self.connection.ops.quote_name(table_name))
for number, index, unique in cursor.fetchall():
for row in cursor.fetchall():
# Sqlite3 3.8.9+ has 5 columns, however older versions only give 3
# columns. Discard last 2 columns if there.
number, index, unique = row[:3]
# Get the index info for that index
cursor.execute('PRAGMA index_info(%s)' % self.connection.ops.quote_name(index))
for index_rank, column_rank, column in cursor.fetchall():

8
docs/releases/1.7.8.txt Normal file
View File

@ -0,0 +1,8 @@
==========================
Django 1.7.7 release notes
==========================
*Under development*
Django 1.7.8 fixes database introspection with SQLite 3.8.9 (released April 8,
2015) (:ticket:`24637`).

View File

@ -41,3 +41,6 @@ Bugfixes
* Fixed a crash with ``QuerySet.update()`` on foreign keys to instances with
``uuid`` primary keys (:ticket:`24611`).
* Fixed database introspection with SQLite 3.8.9 (released April 8, 2015)
(:ticket:`24637`).

View File

@ -40,6 +40,7 @@ versions of the documentation contain the release notes for any later releases.
.. toctree::
:maxdepth: 1
1.7.8
1.7.7
1.7.6
1.7.5