mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #28584 -- Dropped support for SQLite < 3.7.15.
This commit is contained in:
@@ -87,21 +87,6 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
||||
pk_col = self.get_primary_key_column(cursor, table_name)
|
||||
return [{'table': table_name, 'column': pk_col}]
|
||||
|
||||
def column_name_converter(self, name):
|
||||
"""
|
||||
SQLite will in some cases, e.g. when returning columns from views and
|
||||
subselects, return column names in 'alias."column"' format instead of
|
||||
simply 'column'.
|
||||
|
||||
Affects SQLite < 3.7.15, fixed by http://www.sqlite.org/src/info/5526e0aa3c
|
||||
"""
|
||||
# TODO: remove when SQLite < 3.7.15 is sufficiently old.
|
||||
# 3.7.13 ships in Debian stable as of 2014-03-21.
|
||||
if self.connection.Database.sqlite_version_info < (3, 7, 15):
|
||||
return name.split('.')[-1].strip('"')
|
||||
else:
|
||||
return name
|
||||
|
||||
def get_relations(self, cursor, table_name):
|
||||
"""
|
||||
Return a dictionary of {field_name: (field_name_other_table, other_table)}
|
||||
|
||||
Reference in New Issue
Block a user