Migration tests: what they catch and the release incidents they cover

Migration tests (migrations run against a production-shaped copy with timing and rollback checks) run at the pre-deploy stage.

4 published incident types list migration tests as a class that catches them; 3 of these links are cited in a public report and 1 are by design analysis.

stage: pre-deploy · 4 published incident types · 3 cited

What migration tests catch and cannot catch

Catches

  • failing or slow migrations
  • missing indexes
  • locks
  • irreversible changes

Cannot catch

  • application code paths that read the new schema

Both lists come from the site's test class definitions.

Incident types this class catches

IncidentStageLimitation on that pageBasis
Irreversible migration fails midwaypre-deployMigration tests check the schema change itself, not the application code paths that read the new schema, so the API outage from code and schema falling out of step can still pass.cited in [1]
Rollback fails due to forward-only changepre-deployMigration tests check the schema and data change, not the application code paths that read it, so the old job distributor failing on rows with the new field type after the revert can still pass.cited in [1]
Long-running migration locks tablepre-deployA migration test on a small or idle copy of the table shows neither the table copy duration nor the lock queue that forms behind a long-running SELECT or worker job lock on the production table.cited in [1]
Missing index after migrationpre-deployA migration test that confirms the index count after a swap passes when a replacement exists, because it does not exercise the application queries that skip that replacement.by design analysis

For cited rows the number shows how many reports on that incident page name this class.

Only on this page

Migration tests are cited most often for Irreversible migration fails midway: 1 public report on that page name this class. The limitation stated there: Migration tests check the schema change itself, not the application code paths that read the new schema, so the API outage from code and schema falling out of step can still pass.

Catalogue entries that name this class

From their own documentation or site, with the verification date. Alphabetical. Not a recommendation.

Tools whose documentation names these test classes

Providers whose site names these test classes

Questions

What is Migration tests?

Migration tests: migrations run against a production-shaped copy with timing and rollback checks. They run at the pre-deploy stage.

What does Migration tests catch?

Migration tests catch failing or slow migrations, missing indexes, locks and irreversible changes. 4 published incident types list this class.

What can Migration tests not catch?

Migration tests cannot catch application code paths that read the new schema.

How is Migration tests different from other test classes?

Migration tests share the pre-deploy stage with contract tests, integration tests, end-to-end tests, load and performance tests, security tests, configuration and environment tests, compatibility tests and chaos and resilience tests; they differ in what each catches.

Can Migration tests run in a production environment?

Migration tests run at the pre-deploy stage, before production traffic.

Which incidents is Migration tests used for?

irreversible migration fails midway, long-running migration locks table, missing index after migration and rollback fails due to forward-only change. 3 of 4 links are cited in a public report; the rest are by design analysis.