[field troubleshooting]: if a Prisma migration fails, clear it with npx prisma migrate resolve with the rolled-back flag and the migration name, and run migrations on the direct (non-pooled) connection since advisory locks need it. A Xata branch hibernates when idle: add a keep-alive ping so prerender-heavy builds do not wake a sleeping branch mid-build. Check migration state with xata roll status, and complete a stuck in-progress roll with xata roll complete before starting a new one.

Context: Prisma migrations against a Xata branch fail, or builds hit a sleeping branch. Two separate issues with separate fixes.

## Matched source
Source: Source: https://github.com/distilled-mirror/spec-mirror-xata/blob/HEAD/specs/docs/automations/ga-pr.md
Original query: "Xata: migration failed / branch hibernates during CI builds"
Key terms: branch, builds, during, failed, hibernates, migration, xata
