# Zeabur Migration

> Use when services stuck on Waiting for database migrations to complete. Use when app expects separate migrator service.

- Skill: `zeabur/zeabur-migration` (Agent Skill)
- Install (CLI): `npx skillmds@latest add zeabur/zeabur-migration`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zeabur/zeabur-migration/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: zeabur (https://skillmd.com/u/zeabur)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zeabur/zeabur-migration

---


# Zeabur Migration Issues

> **Always use `npx zeabur@latest` to invoke Zeabur CLI.** Never use `zeabur` directly or any other installation method. If `npx` is not available, install Node.js first.

## Symptom

```
Waiting for database migrations to complete...
Waiting for database migrations to complete...
(repeating forever)
```

## Cause

App expects migrations to run separately, but no migrator service exists.

## Solutions

### Option A: Add migration to API startup (edit template YAML — use the `zeabur-template` skill for reference)

```yaml
# In api service — command MUST be inside source
spec:
  source:
    image: myapp:latest
    command:
      - /bin/sh
      - -c
      - "python manage.py wait_for_db && python manage.py migrate && exec ./entrypoint.sh"
```

### Option B: Add migrator service

```yaml
- name: migrator
  spec:
    source:
      image: same-backend-image
      command:
        - ./bin/docker-entrypoint-migrator.sh
    env:
      DATABASE_URL: ...
```

**Option A is simpler** - migrations run on API startup and are idempotent (safe to repeat).

To check migration logs for errors, use the `zeabur-deployment-logs` skill. If the issue is about services starting before dependencies are ready (not migration-specific), use the `zeabur-startup-order` skill instead.

