Production Database Recovery, Migration & Stabilization
Overview
This project involved auditing, repairing, and migrating production databases across three live SaaS applications used by active customers and internal teams.
Over time, the systems had developed inconsistencies between development and production environments, including broken relationships, missing records, incomplete migrations, and schema mismatches.
My responsibility was to identify the underlying issues, safely recover affected data, repair database integrity, and bring the environments back into alignment—while minimizing disruption to active users.
A home services marketplace connecting customers with service providers.
mrgogo preview
CajaBento
An expense tracking and retail operations management platform.
Campaign Creator
A visual campaign planning and roadmap management application.
The Challenge
Working with live production databases meant every change needed to account for existing users and real application data.
The main issues included:
Significant schema differences between development and production.
Broken foreign key relationships and references.
Missing or inconsistent production records.
Incomplete or conflicting migration history.
Database changes that could affect existing application functionality.
The need to preserve data integrity while keeping production disruption to a minimum.
Rather than simply applying new migrations, the existing database state first had to be understood and reconciled.
What I Did
1. Database & Schema Auditing
I reviewed the database schemas, relationships, existing records, and migration history across the affected applications.
This helped identify where production had diverged from the expected application schema and which inconsistencies were responsible for application-level problems.
2. Data Recovery & Integrity Repair
I repaired affected production data while preserving valid existing records.
The work included:
Recovering missing records.
Repairing broken relationships.
Resolving invalid references.
Correcting inconsistent data.
Validating foreign key relationships.
Verifying dependent records before and after changes.
3. Production-Safe Migrations
Instead of treating production as a clean database, I designed migration steps around its existing state.
Changes were planned and executed carefully to reduce the risk of destructive operations, unexpected schema conflicts, or data loss.
4. Development & Production Synchronization
I reconciled differences between development and production so both environments followed a more consistent database structure.
This reduced the likelihood of future deployments introducing the same migration and schema conflicts.
5. Post-Migration Validation
After each migration and repair, I validated both the database and application behavior to confirm that:
Required records remained available.
Relationships were intact.
Application queries continued working.
Schema changes had been applied correctly.
Existing functionality remained stable.
Results
The work successfully stabilized three production systems and restored consistency across their database environments.
Improved database integrity across the applications.
Reduced risk associated with future migrations and deployments.
Restored reliable application behavior for active users and internal teams.
Tech Stack
Database: PostgreSQL
Backend Platform: Supabase
Languages: SQL, TypeScript
Runtime: Node.js
Focus: Schema migrations, data recovery, database synchronization, integrity validation
Technical Focus
Production Database Recovery · PostgreSQL Migrations · Schema Reconciliation · Data Integrity · Environment Synchronization · Production Debugging · Backend Reliability
Why This Project Matters
Database problems in production require a different approach from development work. Changes must account for existing customer data, active application behavior, dependencies between records, and the possibility that production no longer matches the expected schema.
This project required working directly with those constraints—investigating the existing state before making changes, recovering affected data safely, validating migrations, and ensuring the applications continued functioning afterward.
It demonstrates hands-on experience with production-critical database recovery, migration strategy, data integrity, and backend system reliability.