1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Refs #27090 -- Added real database sequence introspection.

Thanks Mariusz Felisiak for the Oracle part and Tim Graham for the
review.
This commit is contained in:
Mariusz Felisiak
2017-09-13 20:12:32 +02:00
committed by GitHub
parent c2ecef869c
commit c6a1faecc3
9 changed files with 131 additions and 10 deletions

View File

@@ -85,6 +85,10 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
) for info in self._table_info(cursor, table_name)
]
def get_sequences(self, cursor, table_name, table_fields=()):
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