From zeabur
Resolves Zeabur deployments stuck on 'Waiting for database migrations to complete' by adding migration commands to API startup YAML or creating separate migrator service.
npx claudepluginhub zeabur/agent-skills --plugin zeaburThis skill uses the workspace's default tool permissions.
> **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.
Resolves Zeabur startup order issues causing 'Connection refused' to PostgreSQL/Redis by adding healthChecks to service YAML or wait loops in app commands.
Guides Cloudflare D1 migrations with Drizzle: generate SQL, inspect for destructive changes, apply local/remote, verify schemas, fix stuck migrations and partial failures.
Guides safe database migrations for schema changes, data backfills, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and ORMs like Prisma, Drizzle, Kysely, Django, TypeORM.
Share bugs, ideas, or general feedback.
Always use
npx zeabur@latestto invoke Zeabur CLI. Never usezeaburdirectly or any other installation method. Ifnpxis not available, install Node.js first.
Waiting for database migrations to complete...
Waiting for database migrations to complete...
(repeating forever)
App expects migrations to run separately, but no migrator service exists.
zeabur-template skill for reference)# 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"
- 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.