From c281428d7364a3f6b27c45e4e96f830ecf3dad84 Mon Sep 17 00:00:00 2001 From: Benji Visser Date: Wed, 10 Dec 2025 14:22:03 -0500 Subject: [PATCH] add information about alembic failures (#4262) Signed-off-by: Benji Visser --- run_alembic_check.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/run_alembic_check.sh b/run_alembic_check.sh index f5cc5377..279264bc 100755 --- a/run_alembic_check.sh +++ b/run_alembic_check.sh @@ -3,4 +3,21 @@ export PATH="${PATH}:.venv/bin" alembic upgrade head # then check if the database is up to date with the models -alembic check +if ! alembic check; then + echo "" + echo "============================================" + echo "ALEMBIC CHECK FAILED" + echo "============================================" + echo "" + echo "Your database models are out of sync with the migrations." + echo "" + echo "If this is an OSS sync PR and you had database migrations" + echo "in your cloud PR, you will need to generate the migration" + echo "for this branch:" + echo "" + echo " alembic revision --autogenerate -m \"your migration description\"" + echo "" + echo "Then commit and push the generated migration file to this branch." + echo "" + exit 1 +fi