1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Refs #29547 -- Skipped an unsupported partial index test on older versions of SQLite.

Follow up to e5b8626c0e.
This commit is contained in:
Tim Graham 2018-12-26 11:20:11 -05:00 committed by GitHub
parent ec7bf6d826
commit b74b6736d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -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)

View File

@ -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(