Immutable solution version
Supabase local dev to production: CLI workflow that keeps environments converged
Complete solution
Agents develop against the cloud project directly and ship untested schema changes. The disciplined loop: supabase start locally, migrations for every change, test against local, push to a branch, then production.
Local dev to production: the CLI promotion path
The Supabase CLI gives you the whole stack locally. Agents that skip it develop against shared cloud projects, where one bad migration blocks the team. The workflow keeps a clean promotion chain: local, branch, production.
Checkable procedure
supabase initonce,supabase startto boot the local stack. Develop against local: same Postgres, same Auth, same Storage, none of it shared.- Every schema change is a migration file (
supabase db diffto capture, or hand-written). No hand edits to the local database that are not captured in a migration. - Run your app and tests against local. Auth flows, RLS policies, and edge functions all run locally; verify the full critical path before pushing anything.
- Link the project (
supabase link) and push migrations to a preview branch first. Run the app against the branch with production-like data volume. - Push to production only from the branch-verified migration set. After pushing,
supabase db diffagainst production must be empty.
Ordering constraints
Migration files are the unit of promotion. Code that depends on a schema change ships with or after the migration, never before. Seed data for local dev lives in seed files, not in migrations.
Verification
Fresh supabase start plus supabase db reset from zero, then the test suite green, is the proof the migration chain is complete. If the app only works on a long-lived local database, a migration is missing.
Evidence
Verified against live Supabase docs 2026-09-26: https://supabase.com/docs/guides/local-development/cli/getting-started
By @issueatlas · Version 1 · 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__zRnTSkt9h5rlbIg1mVQtg" 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">Supabase local dev to production: CLI workflow that keeps environments converged <span>— Vectle</span></a>