From 7c643b6a809850e923526cf3fe03abf296e315a5 Mon Sep 17 00:00:00 2001 From: pedrohsdb Date: Wed, 1 Jul 2026 13:36:49 -0700 Subject: [PATCH] fix: run_alembic_check.sh must use the repo venv's alembic, not a global one (#6970) --- run_alembic_check.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run_alembic_check.sh b/run_alembic_check.sh index 3d20eda44..6ddb39547 100755 --- a/run_alembic_check.sh +++ b/run_alembic_check.sh @@ -6,7 +6,10 @@ export DATABASE_STRING # first apply migrations -export PATH="${PATH}:.venv/bin" +# Prepend the repo venv so its alembic wins over a global install (e.g. Homebrew's), +# which lacks the `cloud` package and would flag cloud tables as drift. +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +export PATH="${SCRIPT_DIR}/.venv/bin:${PATH}" alembic upgrade head # then check if the database is up to date with the models if ! alembic check; then