Fixed #33717 -- Dropped support for PostgreSQL 11.

This commit is contained in:
Mariusz Felisiak 2022-05-19 09:26:48 +02:00 committed by GitHub
parent 9f55489529
commit 981c23c0cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 22 additions and 118 deletions

View file

@ -505,7 +505,6 @@ class SchemaTests(PostgreSQLTestCase):
index_name, self.get_constraints(CharFieldModel._meta.db_table)
)
@skipUnlessDBFeature("supports_covering_gist_indexes")
def test_gist_include(self):
index_name = "scene_gist_include_setting"
index = GistIndex(name=index_name, fields=["scene"], include=["setting"])
@ -519,20 +518,6 @@ class SchemaTests(PostgreSQLTestCase):
editor.remove_index(Scene, index)
self.assertNotIn(index_name, self.get_constraints(Scene._meta.db_table))
def test_gist_include_not_supported(self):
index_name = "gist_include_exception"
index = GistIndex(fields=["scene"], name=index_name, include=["setting"])
msg = "Covering GiST indexes require PostgreSQL 12+."
with self.assertRaisesMessage(NotSupportedError, msg):
with mock.patch(
"django.db.backends.postgresql.features.DatabaseFeatures."
"supports_covering_gist_indexes",
False,
):
with connection.schema_editor() as editor:
editor.add_index(Scene, index)
self.assertNotIn(index_name, self.get_constraints(Scene._meta.db_table))
def test_tsvector_op_class_gist_index(self):
index_name = "tsvector_op_class_gist"
index = GistIndex(