How to Compare Database Schemas Before Deploying
A step-by-step workflow for catching schema drift between staging and production.
Paste two schema exports from your Firebase Data Connect PostgreSQL instances. Spot every table, column, index, and constraint change instantly. Get ready-to-run ALTER TABLE scripts — all in your browser.
No account required. No data leaves your device.
SchemaLens understands PostgreSQL-specific syntax that generic diff tools miss — perfect for Firebase Data Connect's Cloud SQL PostgreSQL backend.
Diff schemas from Firebase Data Connect's Cloud SQL PostgreSQL instances. Works with pg_dump exports and Data Connect schema definition files.
Compare schemas between Firebase production and staging projects. Export from each project's Cloud SQL instance to validate Data Connect schema changes.
Validate that your PostgreSQL schema changes align with your Firebase Data Connect GraphQL schema. Catch mismatched columns and types before deployment.
Primary keys, unique constraints, foreign keys, CHECK constraints, and partial indexes — all compared semantically, not by raw text.
Detects CREATE FUNCTION and CREATE TRIGGER changes. Useful for Firebase projects using PostgreSQL functions for computed fields and validation.
Your schema never leaves the browser. Compare production Firebase schemas safely without uploading sensitive table structures to a third-party server.
Run pg_dump --schema-only against your Firebase Data Connect Cloud SQL instance, or export schema from the Firebase Console.
Copy the SQL into the two editor panes. Dialect is automatically set to PostgreSQL (Firebase Data Connect's engine).
See added tables, dropped columns, type changes, and constraint modifications highlighted in color. Breaking changes flagged in red.
Export ALTER TABLE scripts, save as Markdown, PDF, or raw SQL. Apply via Firebase Data Connect deploy or your migration tool.
SchemaLens generates production-ready ALTER TABLE scripts for every change it detects in your Firebase Data Connect project.
ALTER TABLE "users"
ALTER COLUMN "bio" TYPE VARCHAR(500);
ALTER TABLE "orders"
ADD COLUMN "shipped_at" TIMESTAMP;
ALTER TABLE "comments"
ADD CONSTRAINT "fk_comments_post"
FOREIGN KEY ("post_id") REFERENCES "posts"("id");
CREATE INDEX "idx_orders_user_id"
ON "orders"("user_id");
SchemaLens runs in your browser and works with any Firebase Data Connect project — no gcloud CLI setup required.
A step-by-step workflow for catching schema drift between staging and production.
8 practical differences that trip up developers switching between the two databases.
Learn how to catch dropped columns, missing indexes, and type changes before they cause incidents.
Join thousands of developers who use SchemaLens to catch schema changes before they hit production.
Start Comparing FreeFree for up to 10 tables. Pro starts at $12/mo.