From 7dfeb00382033040739ce2c75a415f7c49cc2e40 Mon Sep 17 00:00:00 2001 From: wangdl Date: Sun, 21 Jun 2026 12:23:32 +0800 Subject: [PATCH] fix: M-AI-03 depends on current-integration for migrations current-integration already handles migration baselining + deploy correctly. Running a parallel baseline in m-ai-03 would mark all migrations as applied without creating tables when _prisma_migrations is empty, then migrate deploy finds nothing to run. Depending on current-integration ensures DB schema is ready before E2E tests execute. Co-Authored-By: Claude --- .gitea/workflows/deploy.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index ccc38ed..453a226 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -295,7 +295,7 @@ jobs: # Job 4: M-AI-03 Synthetic E2E # ═══════════════════════════════════════════════════════════ m-ai-03-synthetic-e2e: - needs: build-and-unit + needs: current-integration runs-on: prod steps: - name: Restore build artifacts @@ -309,23 +309,6 @@ jobs: docker start mysql redis 2>/dev/null || true sleep 2 - - name: Apply database migrations - run: | - cd $WORKDIR - HAS_MIGS=$(npx prisma db execute --stdin <<< "SELECT COUNT(*) as cnt FROM _prisma_migrations" 2>/dev/null | grep -o '[0-9]*' | head -1 || echo "0") - if [ "$HAS_MIGS" = "0" ] || [ -z "$HAS_MIGS" ]; then - echo "[M-AI-03] Baselining existing migrations..." - for m in prisma/migrations/*/; do - m_name=$(basename "$m") - if [ "$m_name" != "backfill_chat_scope.sql" ] && [ "$m_name" != "migration_lock.toml" ]; then - DATABASE_URL="${{ secrets.DATABASE_URL }}" npx prisma migrate resolve --applied "$m_name" 2>/dev/null || true - fi - done - echo "[M-AI-03] Baseline complete." - fi - DATABASE_URL="${{ secrets.DATABASE_URL }}" npx prisma migrate deploy - timeout-minutes: 5 - - name: M-AI-03 Gate E2E run: | cd $WORKDIR