summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-09-20 13:45:51 +0200
committerGitHub <noreply@github.com>2023-09-20 13:45:51 +0200
commit2c6ebb65c9eb6b11347d907127b82d31e04569e5 (patch)
tree9fb8a476675fd382ea17fd6aa5c59a14a1e86bc8 /tests/postgres_tests
parent0b506bfe1ab9f1c38e439c77b3c3f81c8ac663ea (diff)
Fixed #34851 -- Dropped support for PostgreSQL 12 and PostGIS 2.5.
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r--tests/postgres_tests/migrations/0001_setup_extensions.py10
1 files changed, 1 insertions, 9 deletions
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(),