mirror of
https://github.com/clearml/clearml-server
synced 2025-06-26 23:15:47 +00:00
Fix running migration scripts calling other files
This commit is contained in:
@@ -69,7 +69,8 @@ def _apply_migrations(log: Logger):
|
|||||||
log.info(f"Skipping migration {script.name} (empty databases)")
|
log.info(f"Skipping migration {script.name} (empty databases)")
|
||||||
else:
|
else:
|
||||||
spec = importlib.util.spec_from_file_location(
|
spec = importlib.util.spec_from_file_location(
|
||||||
".".join((_parent_dir.name, _migrations, script.stem)), str(script)
|
".".join(("apiserver", _parent_dir.name, _migrations, script.stem)),
|
||||||
|
str(script),
|
||||||
)
|
)
|
||||||
module = importlib.util.module_from_spec(spec)
|
module = importlib.util.module_from_spec(spec)
|
||||||
spec.loader.exec_module(module)
|
spec.loader.exec_module(module)
|
||||||
|
|||||||
Reference in New Issue
Block a user