Agent Wranglers

Migrations Required

Test migrations on a copy of production data

Run each migration on a recent copy of production data before it reaches production, and time it.

How to do it

Restore last night's backup to a staging database on the production side, so personal data never leaves it. Or use a masked copy. Run the pending migrations and the test suite. Production data finds the rows that break a new constraint, and the time shows how long locks last.

How to check

The deploy pipeline shows a passed migration run on the copy, with its duration, before the production step.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers data playbook: https://agentwranglers.se/playbook/data/migrations/test-migrations.