mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-09-03 20:52:57 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user