mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-13 02:58:17 -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
|
import extras.models
|
||||||
from django.db.utils import OperationalError
|
from django.db.utils import OperationalError
|
||||||
|
|
||||||
from extras.constants import (CF_FILTER_DISABLED, CF_FILTER_EXACT, CF_FILTER_LOOSE,
|
from extras.constants import CF_FILTER_DISABLED, CF_FILTER_EXACT, CF_FILTER_LOOSE, CF_TYPE_SELECT
|
||||||
CF_TYPE_SELECT, DB_MINIMUM_VERSION)
|
|
||||||
|
|
||||||
|
|
||||||
def verify_postgresql_version(apps, schema_editor):
|
def verify_postgresql_version(apps, schema_editor):
|
||||||
"""
|
"""
|
||||||
Verify that PostgreSQL is version 9.4 or higher.
|
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:
|
try:
|
||||||
pg_version = connection.pg_version
|
pg_version = connection.pg_version
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user