Auto DB Migrations on Push is a devops workflow that chains Supabase + GitHub to automate a common task. Every push to main triggers a Supabase migration automatically. Schema diffs are committed and applied with zero manual steps. Once configured, it saves ~5 hours/week per backend engineer, plus elimination of 1-2 migration incidents per quarter and runs through Claude Code, Cursor, Windsurf or any MCP-compatible AI agent.
Every push to main triggers a Supabase migration automatically. Schema diffs are committed and applied with zero manual steps.
Execute this recipe in your browser — no local install, no Claude Code. Streams results live.
Supabase handles your database schema and GitHub tracks your code changes. Together, they eliminate the manual step of applying migrations — every push with SQL changes triggers automatic schema updates on staging. This closes the gap between code and schema that causes the most deployment-day incidents.
SSH into server, run migration script manually, hope nothing breaks, verify schema by hand, document the change in a spreadsheet.
Push code. Migrations apply automatically. Status posted as a PR comment. Zero manual steps.
Concrete ROI — not marketing fluff.
Time saved
~5 hours/week per backend engineer, plus elimination of 1-2 migration incidents per quarter
This prompt is the workflow. Paste into Claude Code, Cursor, or Windsurf.
You are a database migration agent. Every push to main triggers this workflow. On GitHub push event to main: 1. Call github.list_pull_requests to find the merged PR and get the commit diff 2. Filter changed files for any matching supabase/migrations/*.sql 3. For each new migration file, call supabase.apply_migration(name, query) with the file contents 4. If apply_migration returns an error, call github.create_issue with title "Migration failed: <file>" and the error body 5. On success, call github.add_pr_comment with a summary table: file | status | duration Reply only with the migration receipt: "Applied N migrations — SHA <commit>".
How this workflow fires and what env vars you need.
POST /webhook/github (add in GitHub repo → Settings → Webhooks, event: push to main)
GITHUB_WEBHOOK_SECRETWebhook signing secret (set when creating webhook)
e.g. a-long-random-string
Install everything — MCPs, prompt, env template — in a single call.
$ mcpizy recipe install supabase-github-db-migrations ✓ Installs all 2 MCP servers ✓ Writes prompt to ~/.mcpizy/prompts/supabase-github-db-migrations.md ✓ Generates .env.example in current directory ✓ Ready to paste into Claude Code
Requires mcpizy CLI v1.1+ — install via npm i -g mcpizy.
$ mcpizy install supabase && mcpizy install githubOpen a PR and a Vercel preview URL appears as a comment within minutes. Branches are cleaned up automatically when PRs close.
Build, tag, push to ECR and deploy to ECS in one automated pipeline triggered by a git tag or manual dispatch.
Each PR gets its own Neon database branch for isolated testing. Branch is deleted automatically when the PR closes.
A Linear issue assigned to a developer automatically creates a git branch, syncs status changes, and opens a draft PR.
Auto DB Migrations on Push is a devops automation that uses Supabase + GitHub together via the Model Context Protocol. Every push to main triggers a Supabase migration automatically. Schema diffs are committed and applied with zero manual steps.
Setup takes around 10 min setup, then fully automated. You install the required MCP servers with `mcpizy install supabase && mcpizy install github`, connect your accounts, and the workflow is ready to run.
Once running, this workflow saves ~5 hours/week per backend engineer, plus elimination of 1-2 migration incidents per quarter. The concrete business value: Eliminates 90% of migration-day production incidents by enforcing review + auto-apply workflow; Cuts deployment friction — engineers stop context-switching to run migration scripts manually.
You need 2 MCP servers: Supabase (mcpizy install supabase), GitHub (mcpizy install github). All are installable in one command via the MCPizy CLI and configured in your `.claude.json` or `.cursor/mcp.json`.
Yes. The workflow runs with any MCP-compatible AI agent — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code with Copilot, and custom agents built on the MCP SDK. The MCP servers are identical across clients; only the config file path (`.claude.json` vs `.cursor/mcp.json`) changes.
Install the required MCPs from the marketplace and automate this in 10 min setup.
$ mcpizy install supabase && mcpizy install github
Free to install. Connect your accounts and this workflow runs itself.