Production Database Migration Checklist

Run every pre-flight check, dry run, and verification step before switching production application connections to a new database.

Phase 1: Pre-flight inspection

  1. Take a verified backup of the source database.
  2. Create a dedicated read-only migration user on source and confirm write privileges on an empty target database.
  3. Inspect all tables without Primary Keys and confirm your recovery strategy if a connection drops.
  4. Review all triggers, views, stored procedures, and generated columns flagged under Unmigrated Objects.
  5. Export plan.json and verify zero passwords appear in the file.

Phase 2: Execution and verification

  1. Execute a full dry run against staging using a masked or representative snapshot.
  2. Verify all 9 mandatory verification checks pass and inspect normalized SHA-256 checksums for every table.
  3. Verify Primary Key sample rows for high-precision DECIMAL(20, 8), Unicode, NULL vs empty string, and timestamps.
  4. Confirm identity and serial sequences match MAX(id) before enabling writes.
  5. Schedule a maintenance window for final cutover; do not rely on Cancel as an automatic rollback.

Frequently asked questions

Why is counting rows insufficient for database migration verification?

Row counts miss silent truncation, NULL-to-empty-string changes, decimal rounding drift, and character encoding corruption. Checksums and sampled PK comparisons catch cell-level regressions.