fix(database): enforce Flyway migration governance

This commit is contained in:
xqzp2026
2026-09-03 18:28:10 +09:30
parent b1dd68a14c
commit 87659f9de9
15 changed files with 228 additions and 18 deletions
+7 -1
View File
@@ -28,6 +28,12 @@ is_running() {
health_check() {
# /mcp 未带 ak 会返回 401,带 ak 返回 200——两者都证明服务已起来
for i in $(seq 1 90); do
if ! is_running; then
echo "[ERROR] 服务进程已退出,可能是数据库迁移或启动失败" >&2
tail -40 "$LOG_FILE" >&2 || true
rm -f "$PID_FILE"
return 1
fi
code=$(curl -s -o /dev/null -w "%{http_code}" -X POST "http://127.0.0.1:$PORT/mcp" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
@@ -44,7 +50,7 @@ health_check() {
do_build() {
cd "$APP_HOME"
./mvnw clean package -DskipTests
./mvnw clean package
echo "[OK] 构建完成: $JAR"
}