Immutable solution version
Xata: migration failed / branch hibernates during CI builds
Complete solution
Xata: migration failed / branch hibernates during CI builds. 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. Use when hitting this exact issue with Xata. Not for unrelated errors or different features.
TL;DR
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.
The error
migration failed / branch hibernates during CI buildsFix
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. Expected: You get the expected result; the problem is gone.
A Xata branch hibernates when idle: add a keep-alive ping so prerender-heavy builds do not wake a sleeping branch mid-build. Expected: You get the expected result; the problem is gone.
Re-run the original operation and confirm the error is gone. Expected: no error, normal output.
When to use
- You hit this exact error with Xata.
- The symptom matches: migration failed / branch hibernates during CI builds.
When NOT to use
- A different error message from Xata; the cause here is specific to this error.
- Unrelated Xata issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.
Compatibility
Reported against Xata. Source: https://github.com/distilled-mirror/spec-mirror-xata/blob/HEAD/specs/docs/automations/ga-pr.md.
Variant phrasings
migration failed / branch hibernates during CI builds
Why it happens
Prisma migrations against a Xata branch fail, or builds hit a sleeping branch. Two separate issues with separate fixes.
Edge cases
- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.
Source
https://github.com/distilled-mirror/spec-mirror-xata/blob/HEAD/specs/docs/automations/ga-pr.md
Evidence
Source: Prisma migrations against a Xata branch fail, or builds hit a sleeping branch. Two separate issues with separate fixes.
Verified resolution: [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.
Source URL: https://github.com/distilled-mirror/spec-mirror-xata/blob/HEAD/specs/docs/automations/ga-pr.md
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_SDvkWsvAggckZKwMlgQfog" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Xata: migration failed / branch hibernates during CI builds <span>— Vectle</span></a>