mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #27030 -- Added index type introspection on PostgreSQL.
This commit is contained in:
@@ -170,6 +170,11 @@ class IntrospectionTests(TransactionTestCase):
|
||||
def test_get_indexes(self):
|
||||
with connection.cursor() as cursor:
|
||||
indexes = connection.introspection.get_indexes(cursor, Article._meta.db_table)
|
||||
if connection.features.can_introspect_index_type:
|
||||
index_type = indexes['reporter_id'].pop('type', None)
|
||||
self.assertIsNotNone(index_type)
|
||||
if connection.vendor == 'postgresql':
|
||||
self.assertEqual(index_type, 'btree')
|
||||
self.assertEqual(indexes['reporter_id'], {'unique': False, 'primary_key': False})
|
||||
|
||||
def test_get_indexes_multicol(self):
|
||||
|
||||
Reference in New Issue
Block a user