DB-002 critical general

CI verifies migrations on ephemeral test DB

CI pipeline must apply migrations to a Docker-based ephemeral test database, not just dry-run or status checks.

Question to ask

"Migrations tested against a real DB, or just hope they work?"

Verification guide

Severity: Critical

Check automatically:

  1. Look for migration commands in CI workflows:

    grep -r "prisma migrate\|prisma db push" .github/workflows/ 2>/dev/null
    
  2. Check for Docker database in CI:

    grep -r "postgres:\|mysql:\|services:" .github/workflows/ 2>/dev/null
    
  3. Verify migration runs against test DB (not dry-run only):

    grep -r "migrate deploy\|migrate dev" .github/workflows/ 2>/dev/null
    

Pass criteria:

  • CI pipeline includes migration step
  • Migrations applied to Docker-based ephemeral test database
  • Not just dry-run or status check

Fail criteria:

  • No migration step in CI
  • Migrations only run manually
  • Dry-run only without actual application

Evidence to capture:

  • CI config file path
  • Migration command used
  • Database service configuration in CI

Section

05. Database & Connections

Database & Data