|
@@ -46,9 +46,12 @@ def run_migrations():
|
|
from alembic import command
|
|
from alembic import command
|
|
from alembic.config import Config
|
|
from alembic.config import Config
|
|
|
|
|
|
- print(OPEN_WEBUI_DIR)
|
|
|
|
-
|
|
|
|
alembic_cfg = Config(OPEN_WEBUI_DIR / "alembic.ini")
|
|
alembic_cfg = Config(OPEN_WEBUI_DIR / "alembic.ini")
|
|
|
|
+
|
|
|
|
+ # Set the script location dynamically
|
|
|
|
+ migrations_path = OPEN_WEBUI_DIR / "migrations"
|
|
|
|
+ alembic_cfg.set_main_option("script_location", str(migrations_path))
|
|
|
|
+
|
|
command.upgrade(alembic_cfg, "head")
|
|
command.upgrade(alembic_cfg, "head")
|
|
except Exception as e:
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
print(f"Error: {e}")
|