Fix default_connection when upgrade
This commit is contained in:
@@ -174,7 +174,10 @@ class Migrate:
|
||||
temp_config = deepcopy(config)
|
||||
path = os.path.join(location, app, cls.old_models)
|
||||
path = path.replace("/", ".").lstrip(".")
|
||||
temp_config["apps"][cls.diff_app] = {"models": [path]}
|
||||
temp_config["apps"][cls.diff_app] = {
|
||||
"models": [path],
|
||||
"default_connection": config.get("apps").get(app).get("default_connection","default"),
|
||||
}
|
||||
return temp_config
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user