mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 00:28:16 -06:00
Update 0008_reports.py
PG10 version string appears to, at least on Windows, contain a comma.
This commit is contained in:
parent
30b544a743
commit
cb19c84070
@ -18,7 +18,7 @@ def verify_postgresql_version(apps, schema_editor):
|
|||||||
with connection.cursor() as cursor:
|
with connection.cursor() as cursor:
|
||||||
cursor.execute("SELECT VERSION()")
|
cursor.execute("SELECT VERSION()")
|
||||||
row = cursor.fetchone()
|
row = cursor.fetchone()
|
||||||
pg_version = row[0].split()[1]
|
pg_version = re.match('^PostgreSQL (\d+\.\d+(\.\d+)?)', row[0])[1]
|
||||||
if StrictVersion(pg_version) < StrictVersion('9.4.0'):
|
if StrictVersion(pg_version) < StrictVersion('9.4.0'):
|
||||||
raise Exception("PostgreSQL 9.4.0 or higher is required ({} found). Upgrade PostgreSQL and then run migrations again.".format(pg_version))
|
raise Exception("PostgreSQL 9.4.0 or higher is required ({} found). Upgrade PostgreSQL and then run migrations again.".format(pg_version))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user