mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-12 10:38:16 -06:00
Define DB_MINIMUM_VERSION locally to freeze to migration.
This commit is contained in:
parent
6c26bd71bc
commit
3ebea26a9f
@ -9,14 +9,16 @@ import django.db.models.deletion
|
||||
import extras.models
|
||||
from django.db.utils import OperationalError
|
||||
|
||||
from extras.constants import (CF_FILTER_DISABLED, CF_FILTER_EXACT, CF_FILTER_LOOSE,
|
||||
CF_TYPE_SELECT, DB_MINIMUM_VERSION)
|
||||
from extras.constants import CF_FILTER_DISABLED, CF_FILTER_EXACT, CF_FILTER_LOOSE, CF_TYPE_SELECT
|
||||
|
||||
|
||||
def verify_postgresql_version(apps, schema_editor):
|
||||
"""
|
||||
Verify that PostgreSQL is version 9.4 or higher.
|
||||
"""
|
||||
# https://www.postgresql.org/docs/current/libpq-status.html#LIBPQ-PQSERVERVERSION
|
||||
DB_MINIMUM_VERSION = 90400 # 9.4.0
|
||||
|
||||
try:
|
||||
pg_version = connection.pg_version
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user