mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
[6.0.x] Fixed #36660 -- Fixed a regression in descending Index local field checks.
Regression in8638d8bf74. Refs #36273. Thanks Federico Bond for the report. Backport ofedde2891c3from main.
This commit is contained in:
@@ -185,6 +185,15 @@ class IndexesTests(TestCase):
|
||||
],
|
||||
)
|
||||
|
||||
def test_pointing_to_desc_field(self):
|
||||
class Model(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
|
||||
class Meta:
|
||||
indexes = [models.Index(fields=["-name"], name="index_name")]
|
||||
|
||||
self.assertEqual(Model.check(databases=self.databases), [])
|
||||
|
||||
def test_pointing_to_m2m_field(self):
|
||||
class Model(models.Model):
|
||||
m2m = models.ManyToManyField("self")
|
||||
|
||||
Reference in New Issue
Block a user