From aae078296291825495b4cf4beac5e4b842d6cdf0 Mon Sep 17 00:00:00 2001 From: jwlademann Date: Thu, 5 Mar 2026 11:49:51 +0000 Subject: [PATCH] Modify alembic function for virtual environment support Source venv if env var is defined to allow support for newer images (e.g. python 3.13) --- scripts/add-aliases.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/add-aliases.sh b/scripts/add-aliases.sh index 5cfbc96..b0b1f55 100755 --- a/scripts/add-aliases.sh +++ b/scripts/add-aliases.sh @@ -165,7 +165,8 @@ function fullreset(){ function alembic(){ ex -e SQL_USE_ALEMBIC_USER=yes -e SQL_PASSWORD=superroot -e SQLALCHEMY_POOL_RECYCLE=3600 ${1} \ - bash -c 'cd /src && python3 manage.py db '"${@:2}"'' + bash -c 'cd /opt/app-root/src && [ -d "$VENV_DIR" ] && source $VENV_DIR/bin/activate; + python3 manage.py db '"${@:2}"'' } function devenv-help(){