mirror of
https://github.com/django/django.git
synced 2025-07-29 16:14:18 +00:00
Fixed #34851 -- Dropped support for PostgreSQL 12 and PostGIS 2.5.
This commit is contained in:
parent
0b506bfe1a
commit
2c6ebb65c9
12 changed files with 32 additions and 47 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue