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

Made get_indexes() consistent across backends.

Fixed #15933, #18082 -- the get_indexes() method introspection was
done inconsitently depending on the backend. For example SQLite
included all the columns in the table in the returned dictionary,
while MySQL introspected also multicolumn indexes.

All backends return now consistenly only single-column indexes.

Thanks to andi for the MySQL report, and ikelly for comments on
Oracle's get_indexes() changes.
This commit is contained in:
Anssi Kääriäinen
2012-04-30 14:05:30 +03:00
parent eba4197c71
commit a18e43c5bb
7 changed files with 66 additions and 56 deletions

View File

@@ -7,6 +7,9 @@ class Reporter(models.Model):
email = models.EmailField()
facebook_user_id = models.BigIntegerField(null=True)
class Meta:
unique_together = ('first_name', 'last_name')
def __unicode__(self):
return u"%s %s" % (self.first_name, self.last_name)
@@ -19,4 +22,4 @@ class Article(models.Model):
return self.headline
class Meta:
ordering = ('headline',)
ordering = ('headline',)