mirror of https://github.com/django/django.git
Refs #26167 -- Changed default value of DatabaseFeatures.supports_expression_indexes to True.
This commit is contained in:
parent
b5cef91a91
commit
ffe756d624
|
@ -282,7 +282,7 @@ class BaseDatabaseFeatures:
|
|||
# Does the backend support covering indexes (CREATE INDEX ... INCLUDE ...)?
|
||||
supports_covering_indexes = False
|
||||
# Does the backend support indexes on expressions?
|
||||
supports_expression_indexes = False
|
||||
supports_expression_indexes = True
|
||||
# Does the backend treat COLLATE as an indexed expression?
|
||||
collate_as_index_expression = False
|
||||
|
||||
|
|
|
@ -59,7 +59,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
supports_ignore_conflicts = False
|
||||
max_query_params = 2**16 - 1
|
||||
supports_partial_indexes = False
|
||||
supports_expression_indexes = True
|
||||
supports_slicing_ordering_in_compound = True
|
||||
allows_multiple_constraints_on_same_fields = False
|
||||
supports_boolean_expr_in_select_clause = False
|
||||
|
|
|
@ -58,7 +58,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
supports_deferrable_unique_constraints = True
|
||||
has_json_operators = True
|
||||
json_key_contains_list_matching_requires_list = True
|
||||
supports_expression_indexes = True
|
||||
|
||||
django_test_skips = {
|
||||
'opclasses are PostgreSQL only.': {
|
||||
|
|
|
@ -38,7 +38,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
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)
|
||||
supports_expression_indexes = True
|
||||
supports_over_clause = Database.sqlite_version_info >= (3, 25, 0)
|
||||
supports_frame_range_fixed_distance = Database.sqlite_version_info >= (3, 28, 0)
|
||||
supports_aggregate_filter_clause = Database.sqlite_version_info >= (3, 30, 1)
|
||||
|
|
|
@ -668,6 +668,12 @@ backends.
|
|||
backends must implement ``DatabaseClient.settings_to_cmd_args_env()`` or
|
||||
override ``DatabaseClient.runshell()``.
|
||||
|
||||
* Third-party database backends must implement support for functional indexes
|
||||
(:attr:`.Index.expressions`) or set
|
||||
``DatabaseFeatures.supports_expression_indexes`` to ``False``. If ``COLLATE``
|
||||
is not a part of the ``CREATE INDEX`` statement, set
|
||||
``DatabaseFeatures.collate_as_index_expression`` to ``True``.
|
||||
|
||||
:mod:`django.contrib.admin`
|
||||
---------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue