mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +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:
@@ -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',)
|
||||
|
||||
Reference in New Issue
Block a user