mirror of
https://github.com/django/django.git
synced 2025-08-06 11:58:26 +00:00
Fixed #32357 -- Dropped support for PostgreSQL 9.6 and PostGIS 2.3.
This commit is contained in:
parent
10d1261984
commit
5371342ed6
16 changed files with 35 additions and 80 deletions
|
@ -58,6 +58,10 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
supports_deferrable_unique_constraints = True
|
||||
has_json_operators = True
|
||||
json_key_contains_list_matching_requires_list = True
|
||||
test_collations = {
|
||||
'non_default': 'sv-x-icu',
|
||||
'swedish_ci': 'sv-x-icu',
|
||||
}
|
||||
|
||||
django_test_skips = {
|
||||
'opclasses are PostgreSQL only.': {
|
||||
|
@ -65,16 +69,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
},
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def test_collations(self):
|
||||
# PostgreSQL < 10 doesn't support ICU collations.
|
||||
if self.is_postgresql_10:
|
||||
return {
|
||||
'non_default': 'sv-x-icu',
|
||||
'swedish_ci': 'sv-x-icu',
|
||||
}
|
||||
return {}
|
||||
|
||||
@cached_property
|
||||
def introspected_field_types(self):
|
||||
return {
|
||||
|
@ -84,10 +78,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
'PositiveSmallIntegerField': 'SmallIntegerField',
|
||||
}
|
||||
|
||||
@cached_property
|
||||
def is_postgresql_10(self):
|
||||
return self.connection.pg_version >= 100000
|
||||
|
||||
@cached_property
|
||||
def is_postgresql_11(self):
|
||||
return self.connection.pg_version >= 110000
|
||||
|
@ -100,10 +90,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
|||
def is_postgresql_13(self):
|
||||
return self.connection.pg_version >= 130000
|
||||
|
||||
has_brin_autosummarize = property(operator.attrgetter('is_postgresql_10'))
|
||||
has_websearch_to_tsquery = property(operator.attrgetter('is_postgresql_11'))
|
||||
supports_table_partitions = property(operator.attrgetter('is_postgresql_10'))
|
||||
supports_covering_indexes = property(operator.attrgetter('is_postgresql_11'))
|
||||
supports_covering_gist_indexes = property(operator.attrgetter('is_postgresql_12'))
|
||||
supports_non_deterministic_collations = property(operator.attrgetter('is_postgresql_12'))
|
||||
supports_alternate_collation_providers = property(operator.attrgetter('is_postgresql_10'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue