← Back to Insights
Case StudySystem DesignSupabase

Case Study: Zero-Downtime Migration for Enterprise Parking

2026-01-14Yash Rawat

Challenge: A legacy parking system restricted members to 2 vehicles. The migration to an "Unlimited Vehicle" schema had to happen without 1 minute of downtime for active guards.

The Solution: Dual-Write Strategy

I implemented a Dual-Write / Read-Fallback architecture. New writes went to both tables; reads checked the new schema first, falling back to legacy columns if missing.

Key Features

  • Offline-First Sync: Bidirectional sync with Google Sheets using a "Clean Slate" strategy to handle row deletions safely.
  • Performance: Reduced vehicle search from 3s to 300ms using RPC (Remote Procedure Call) functions in Postgres instead of client-side filtering.
  • IoT Integration: Guards can send one-tap WhatsApp violation alerts with photo evidence directly from the PWA.