1
0
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:
Alex Gaynor
2012-11-04 10:16:06 -08:00
parent 26e0651c42
commit 6f716e9e5f
12 changed files with 121 additions and 40 deletions

View File

@@ -1,3 +1,6 @@
from django.core.management.color import no_style
from django.core.management.sql import custom_sql_for_model
from django.db import connections, DEFAULT_DB_ALIAS
from django.test import TestCase
from .models import Simple
@@ -15,10 +18,6 @@ class InitialSQLTests(TestCase):
self.assertEqual(Simple.objects.count(), 0)
def test_custom_sql(self):
from django.core.management.sql import custom_sql_for_model
from django.core.management.color import no_style
from django.db import connections, DEFAULT_DB_ALIAS
# Simulate the custom SQL loading by syncdb
connection = connections[DEFAULT_DB_ALIAS]
custom_sql = custom_sql_for_model(Simple, no_style(), connection)