A migration without a testing strategy is gambling. You are betting that the scripts work perfectly, that no data gets lost, and that the application runs fine on the new database. Spoiler: that bet almost never pays off.
Migration testing has three clear phases. Each phase has a specific purpose. Skip any phase and you are flying blind.
Before anyone touches the migration button, you establish your baseline. This is your "before photo." Without it, you have nothing to compare against after the migration.
The migration is running. Your job is to monitor, not interfere. Watch for failures, track progress, and be ready to call a rollback if things go wrong.
The migration finished without errors. Great. But "no errors in the log" does not mean "no problems in the data." Now comes the real testing.
Review the migration plan and data mapping document
Profile the source data — counts, checksums, samples, known quality issues
Run a dry run on a test environment and validate results
Document pre-migration baseline numbers (record counts, checksums)
Monitor the actual migration for errors, timeouts, and progress
Run post-migration record count comparison (source vs target)
Run data integrity and transformation validation queries
Verify referential integrity — no orphan records, no broken FKs
Perform application smoke test on the migrated database
Compare query performance before and after migration
Test the rollback procedure to confirm it actually works
Sign off on migration with documented evidence
Key Point: Three phases: pre-migration (establish baseline), during migration (monitor and watch), post-migration (validate everything). The pre-migration baseline is the most important — without it, you cannot prove whether data was lost.
Key Point: Migration testing has three phases: pre-migration (baseline the source), during migration (monitor for errors), and post-migration (validate the target). Without a pre-migration baseline, you cannot detect data loss.