From 2c6ebb65c9eb6b11347d907127b82d31e04569e5 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Wed, 20 Sep 2023 13:45:51 +0200 Subject: Fixed #34851 -- Dropped support for PostgreSQL 12 and PostGIS 2.5. --- tests/postgres_tests/migrations/0001_setup_extensions.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'tests/postgres_tests') diff --git a/tests/postgres_tests/migrations/0001_setup_extensions.py b/tests/postgres_tests/migrations/0001_setup_extensions.py index 8045610aef..8fbc3e190e 100644 --- a/tests/postgres_tests/migrations/0001_setup_extensions.py +++ b/tests/postgres_tests/migrations/0001_setup_extensions.py @@ -1,6 +1,6 @@ from unittest import mock -from django.db import connection, migrations +from django.db import migrations try: from django.contrib.postgres.operations import ( @@ -9,7 +9,6 @@ try: BtreeGistExtension, CITextExtension, CreateExtension, - CryptoExtension, HStoreExtension, TrigramExtension, UnaccentExtension, @@ -23,11 +22,6 @@ except ImportError: HStoreExtension = mock.Mock() TrigramExtension = mock.Mock() UnaccentExtension = mock.Mock() - needs_crypto_extension = False -else: - needs_crypto_extension = ( - connection.vendor == "postgresql" and not connection.features.is_postgresql_13 - ) class Migration(migrations.Migration): @@ -39,8 +33,6 @@ class Migration(migrations.Migration): # Ensure CreateExtension quotes extension names by creating one with a # dash in its name. CreateExtension("uuid-ossp"), - # CryptoExtension is required for RandomUUID() on PostgreSQL < 13. - CryptoExtension() if needs_crypto_extension else mock.Mock(), HStoreExtension(), TrigramExtension(), UnaccentExtension(), -- cgit v1.3