SupaForge vs. DBDiff
How SupaForge extends DBDiff with Supabase-specific checks beyond schema/data.
What Is DBDiff?
DBDiff is an open source database schema and data diff tool that supports MySQL, PostgreSQL, and SQLite. It compares two databases and generates UP and DOWN SQL migration files — handling tables, columns, indexes, constraints, views, triggers, functions, sequences, and row-level data differences.
DBDiff is a general-purpose tool. It works with any Postgres database, not just Supabase. It is the foundation that SupaForge builds on.
How SupaForge Extends DBDiff
SupaForge uses DBDiff as its engine for schema and data diffing, then adds additional Supabase-specific checks on top:
- RLS policies — Row Level Security policies that exist in one environment but not the other.
- Auth settings — OAuth providers, MFA, JWT expiry, CAPTCHA, and 20+ configuration values.
- Storage buckets — Bucket metadata, policies, and CORS settings.
- Cron jobs — pg_cron schedules that differ or are missing between environments.
- Database webhooks — pg_net hooks and supabase_functions.hooks configuration.
- Edge Functions — Deployed function versions that don't match across environments.
- Realtime publications — Postgres publication configuration drift.
- Vault secrets — Missing or mismatched entries in
vault.secrets. - Extensions — Postgres extensions enabled in one environment but not the other.
| Feature | DBDiff | SupaForge |
|---|---|---|
| Schema diff | ✅ Full DDL (MySQL, PG, SQLite) | ✅ Uses DBDiff engine for PG |
| Data diff | ✅ Row-level insert/update/delete | ✅ Reference data check |
| RLS policies | ❌ Not RLS-aware | ✅ Dedicated check |
| Auth settings | ❌ | ✅ 20+ settings compared |
| Storage buckets | ❌ | ✅ Metadata + policies |
| Cron jobs | ❌ | ✅ pg_cron comparison |
| Webhooks | ❌ | ✅ pg_net hook diff |
| Edge Functions | ❌ | ✅ Version detection |
| Realtime | ❌ | ✅ Publication config diff |
| Vault secrets | ❌ | ✅ Secret inventory comparison |
| Extensions | ❌ | ✅ pg_extension diff |
| Target platform | Any MySQL/PG/SQLite | Supabase environments |
| Multi-DB support | ✅ MySQL, PG, SQLite | PostgreSQL (Supabase) only |
| Drift score | ❌ | ✅ 0–100 with severity |
| Hosted UI | ❌ CLI only | ✅ Web dashboard + CLI |
SupaForge Uses DBDiff Under the Hood
This is not a competing tool — SupaForge is built on top of DBDiff. The schema and data checks invoke DBDiff directly. SupaForge is essentially "DBDiff + everything else Supabase needs".
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 scan --check rlssupaforge scan --check authWhen to Use DBDiff Directly
If you are working with MySQL, SQLite, or non-Supabase PostgreSQL databases, DBDiff is the right tool. It supports cross-database comparison (e.g. MySQL 8 → MySQL 9) and generates SQL migrations with a built-in migration runner.
If you are working with Supabase specifically, SupaForge gives you everything DBDiff offers for schema/data plus the full Supabase configuration surface.
Summary
DBDiff is the battle-tested schema and data diff engine. SupaForge wraps it and adds Supabase-native checks for RLS, auth, storage, cron, webhooks, and Edge Functions — providing a single tool that covers the full Supabase environment surface.