SupaForge vs. Manual SQL Diffing
Why automated environment sync beats hand-written migration scripts.
The Problem with Manual SQL Scripts
Most Supabase teams start by writing migration scripts by hand. A developer changes something in the staging dashboard — adds a column, tweaks an RLS policy, enables a new auth provider — then manually writes SQL to replicate that change in production.
This approach has several well-known failure modes:
- Human error — Forgetting to include a column default, or missing an RLS policy entirely.
- Invisible drift — Dashboard changes that nobody remembers to script, accumulating silently over weeks.
- No coverage beyond schema — Auth settings, storage policies, cron jobs, and Edge Functions are almost never captured in hand-written migrations.
- No rollback path — Manually written UP migrations rarely come with a matching DOWN script.
What SupaForge Does Differently
SupaForge compares two live Supabase environments and produces a comprehensive diff report covering every check — not just Postgres schema, but RLS, auth, storage, cron, reference data, webhooks, Edge Functions, Realtime, Vault, and extensions.
Where manual scripting requires you to remember every change, SupaForge detects changes you didn't even know happened.
| Feature | Manual SQL | SupaForge |
|---|---|---|
| Schema diff | Write by hand per change | Automatic — full DDL comparison |
| RLS policies | Often forgotten | Dedicated RLS check scan |
| Auth settings | Not covered | 20+ auth setting comparisons |
| Storage buckets | Not covered | Bucket metadata & policy diff |
| Cron jobs | Not covered | pg_cron schedule comparison |
| Edge Functions | Not covered | Version mismatch detection |
| Rollback SQL | Rarely written | Auto-generated UP + DOWN |
| CI/CD integration | Custom scripting | Single command in pipeline |
Quick Start
Getting started takes seconds — install, configure, scan:
npm i -g @akalforge/supaforge{
"environments": {
"staging": {
"dbUrl": "postgresql://user:pass@db.STAGING_REF.supabase.co:5432/postgres",
"projectRef": "STAGING_REF",
"apiKey": "your-staging-service-role-key"
},
"production": {
"dbUrl": "postgresql://user:pass@db.PROD_REF.supabase.co:5432/postgres",
"projectRef": "PROD_REF",
"apiKey": "your-production-service-role-key"
}
},
"source": "staging",
"target": "production"
}supaforge scansupaforge promoteWhen Manual SQL Still Makes Sense
For highly custom data migrations — backfilling a new column from an external API, or reshaping data across tables — a hand-written script is still the right tool. SupaForge is designed to catch the drift you don't write scripts for, not to replace intentional migration logic.
Summary
Manual SQL diffing is error-prone, limited to schema, and scales poorly with team size. SupaForge automates the detection of differences across all Supabase checks, generates both UP and DOWN SQL, and integrates into CI/CD — giving you confidence that staging and production stay in sync.