mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-16 00:37:11 +08:00
[3.2] Adjust model indexes (#587)
This commit is contained in:
10
tests/typecheck/models/test_indexes.yml
Normal file
10
tests/typecheck/models/test_indexes.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
- case: model_index
|
||||
main: |
|
||||
from django.db import models
|
||||
from django.db.models.functions import Lower
|
||||
models.Index(fields=["foo"])
|
||||
models.Index("foo", models.F("bar"), Lower("baz"), name="test")
|
||||
models.Index("foo", name="test", opclasses=["bar"])
|
||||
models.Index("foo", name="test", condition=models.Q(foo=1))
|
||||
models.Index("foo", name="test", include=["bar"])
|
||||
|
||||
Reference in New Issue
Block a user