mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #34851 -- Dropped support for PostgreSQL 12 and PostGIS 2.5.
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user