Refs #26889 -- Refactored SchemaEditor to allow backend specific indexes.

This commit is contained in:
Jon Dufresne 2016-07-15 07:34:37 -07:00 committed by Tim Graham
parent f8bfa80680
commit 3f76d1402d
3 changed files with 15 additions and 18 deletions

View file

@ -46,7 +46,7 @@ class SchemaIndexesTests(TestCase):
from .models import IndexedArticle
index_sql = connection.schema_editor()._model_indexes_sql(IndexedArticle)
self.assertEqual(len(index_sql), 5)
self.assertIn('("headline" varchar_pattern_ops)', index_sql[2])
self.assertIn('("headline" varchar_pattern_ops)', index_sql[1])
self.assertIn('("body" text_pattern_ops)', index_sql[3])
# unique=True and db_index=True should only create the varchar-specific
# index (#19441).