Move the config database schema version out of the configuration file and into the model class.

Turns out using the config file isn't a good idea if users copy config.py to config_local.py, as it prevents upgrades to the database. This has the added side-effect of simplifying future changes, as you only need to edit 2 files to modify the config DB now, not 3.
This commit is contained in:
Dave Page
2016-06-24 12:50:52 +01:00
parent a7e1e25cf4
commit d63b54610b
4 changed files with 27 additions and 5 deletions
+5
View File
@@ -26,6 +26,11 @@ from pgadmin.model import db, Role, User, Server, \
# Configuration settings
import config
# Get the config database schema version. We store this in pgadmin.model
# as it turns out that putting it in the config files isn't a great idea
from pgadmin.model import SCHEMA_VERSION
config.SETTINGS_SCHEMA_VERSION = SCHEMA_VERSION
# If script is running under python2 then change the behaviour of functions
if hasattr(__builtins__, 'raw_input'):
input = raw_input