mirror of https://github.com/django/django.git
Refs #29547 -- Skipped an unsupported partial index test on older versions of SQLite.
Follow up to e5b8626c0e
.
This commit is contained in:
parent
ec7bf6d826
commit
b74b6736d0
|
@ -275,6 +275,7 @@ class BaseDatabaseFeatures:
|
|||
|
||||
# Does the backend support partial indexes (CREATE INDEX ... WHERE ...)?
|
||||
supports_partial_indexes = True
|
||||
supports_functions_in_partial_indexes = True
|
||||
|
||||
def __init__(self, connection):
|
||||
self.connection = connection
|
||||
|
|
|
@ -39,3 +39,4 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
# reasonably performant way.
|
||||
supports_pragma_foreign_key_check = Database.sqlite_version_info >= (3, 20, 0)
|
||||
can_defer_constraint_checks = supports_pragma_foreign_key_check
|
||||
supports_functions_in_partial_indexes = Database.sqlite_version_info >= (3, 15, 0)
|
||||
|
|
|
@ -303,6 +303,7 @@ class PartialIndexTests(TransactionTestCase):
|
|||
))
|
||||
editor.remove_index(index=index, model=Article)
|
||||
|
||||
@skipUnlessDBFeature('supports_functions_in_partial_indexes')
|
||||
def test_multiple_conditions(self):
|
||||
with connection.schema_editor() as editor:
|
||||
index = Index(
|
||||
|
|
Loading…
Reference in New Issue