fix: migration failed, directly exit the script

This commit is contained in:
fatelei 2026-06-03 14:29:03 +08:00
parent 7507e9ba67
commit 071c48701f
No known key found for this signature in database
GPG Key ID: 2F91DA05646F4EED
2 changed files with 2 additions and 1 deletions

1
api/uv.lock generated
View File

@ -1300,6 +1300,7 @@ requires-dist = [
{ name = "pydantic-ai-slim", extras = ["anthropic", "google", "openai"], marker = "extra == 'server'", specifier = ">=1.85.1,<2.0.0" },
{ name = "pydantic-settings", marker = "extra == 'server'", specifier = ">=2.12.0,<3.0.0" },
{ name = "redis", marker = "extra == 'server'", specifier = ">=7.4.0,<8.0.0" },
{ name = "shell-session-manager", marker = "extra == 'server'", specifier = "==2.1.1" },
{ name = "typing-extensions", specifier = ">=4.12.2,<5.0.0" },
{ name = "uvicorn", extras = ["standard"], marker = "extra == 'server'", specifier = "==0.46.0" },
]

View File

@ -5,7 +5,7 @@ set -x
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
cd "$SCRIPT_DIR/../api"
uv run flask db upgrade
uv run flask db upgrade || exit 1
uv run \
flask run --host 0.0.0.0 --port=5001 --debug