40 / 65 · 15 SQL & Database Testing · Migration Testing← prev⊞ allnext →☰ Read as one page
5.8Practical Exercise
- Take a migration file (or write one that adds a new column)
- Write a script that tests: applies cleanly, preserves data, rollback works
- Test what happens when the migration adds a NOT NULL column without a default to a table with existing data
- Measure migration time with 100,000 rows and set a performance threshold
- Add migration testing to a CI pipeline