mirror of
https://github.com/django/django.git
synced 2025-07-19 11:15:19 +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
|
@ -345,7 +345,6 @@ class SchemaTests(PostgreSQLTestCase):
|
|||
editor.remove_index(CharFieldModel, index)
|
||||
self.assertNotIn(index_name, self.get_constraints(CharFieldModel._meta.db_table))
|
||||
|
||||
@skipUnlessDBFeature('has_brin_autosummarize')
|
||||
def test_brin_parameters(self):
|
||||
index_name = 'char_field_brin_params'
|
||||
index = BrinIndex(fields=['field'], name=index_name, autosummarize=True)
|
||||
|
@ -358,15 +357,6 @@ class SchemaTests(PostgreSQLTestCase):
|
|||
editor.remove_index(CharFieldModel, index)
|
||||
self.assertNotIn(index_name, self.get_constraints(CharFieldModel._meta.db_table))
|
||||
|
||||
def test_brin_autosummarize_not_supported(self):
|
||||
index_name = 'brin_options_exception'
|
||||
index = BrinIndex(fields=['field'], name=index_name, autosummarize=True)
|
||||
with self.assertRaisesMessage(NotSupportedError, 'BRIN option autosummarize requires PostgreSQL 10+.'):
|
||||
with mock.patch('django.db.backends.postgresql.features.DatabaseFeatures.has_brin_autosummarize', False):
|
||||
with connection.schema_editor() as editor:
|
||||
editor.add_index(CharFieldModel, index)
|
||||
self.assertNotIn(index_name, self.get_constraints(CharFieldModel._meta.db_table))
|
||||
|
||||
def test_btree_index(self):
|
||||
# Ensure the table is there and doesn't have an index.
|
||||
self.assertNotIn('field', self.get_constraints(CharFieldModel._meta.db_table))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue