mirror of
https://github.com/django/django.git
synced 2025-08-31 07:47:37 +00:00
Refs #26889 -- Refactored SchemaEditor to allow backend specific indexes.
This commit is contained in:
parent
f8bfa80680
commit
3f76d1402d
3 changed files with 15 additions and 18 deletions
|
@ -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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue