2017-04-23 22:06:55 -05:00
|
|
|
##########################################################################
|
|
|
|
#
|
|
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
|
|
#
|
2019-01-02 04:24:12 -06:00
|
|
|
# Copyright (C) 2013 - 2019, The pgAdmin Development Team
|
2017-04-23 22:06:55 -05:00
|
|
|
# This software is released under the PostgreSQL Licence
|
|
|
|
#
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
from pgadmin.model import Version
|
|
|
|
|
|
|
|
|
|
|
|
def get_version():
|
|
|
|
try:
|
|
|
|
version = Version.query.filter_by(name='ConfigDB').first()
|
|
|
|
except Exception:
|
|
|
|
return -1
|
|
|
|
|
|
|
|
return version.value
|
2018-12-21 04:30:49 -06:00
|
|
|
|
|
|
|
|
|
|
|
def set_version(new_version):
|
|
|
|
version = Version.query.filter_by(name='ConfigDB').first()
|
|
|
|
version.value = new_version
|