1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #27098 -- Deprecated DatabaseIntrospection.get_indexes

Thanks Akshesh <aksheshdoshi@gmail.com> for help with the PostgreSQL query.
Thanks Tim Graham for the review.
This commit is contained in:
Claude Paroz
2016-08-20 12:14:02 +02:00
parent 1ec1633cb2
commit d389125606
13 changed files with 81 additions and 29 deletions

View File

@@ -69,8 +69,8 @@ class OperationTests(TransactionTestCase):
def assertSpatialIndexExists(self, table, column):
with connection.cursor() as cursor:
indexes = connection.introspection.get_indexes(cursor, table)
self.assertIn(column, indexes)
constraints = connection.introspection.get_constraints(cursor, table)
self.assertIn([column], [c['columns'] for c in constraints.values()])
def alter_gis_model(self, migration_class, model_name, field_name,
blank=False, field_class=None):