mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[1.5.x] Fixed #5805 -- it is now possible to specify multi-column indexes. Thanks to jgelens for the original patch. Backport of 4285571c5a.
This commit is contained in:
12
tests/regressiontests/indexes/tests.py
Normal file
12
tests/regressiontests/indexes/tests.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from django.core.management.color import no_style
|
||||
from django.db import connections, DEFAULT_DB_ALIAS
|
||||
from django.test import TestCase
|
||||
|
||||
from .models import Article
|
||||
|
||||
|
||||
class IndexesTests(TestCase):
|
||||
def test_index_together(self):
|
||||
connection = connections[DEFAULT_DB_ALIAS]
|
||||
index_sql = connection.creation.sql_indexes_for_model(Article, no_style())
|
||||
self.assertEqual(len(index_sql), 1)
|
||||
Reference in New Issue
Block a user