Performance: Migrations concept and workflow
MEDIUM IMPACT
This concept affects the backend database schema update speed and the initial page load time when migrations run during deployment.
Use zero-downtime migration strategies like adding nullable columns first, then backfilling data, and finally making columns non-nullable in separate deploys
python manage.py migrate --noinput during peak traffic without downtime strategy
| Pattern | Database Locks | Server Blocking | User Impact | Verdict |
|---|---|---|---|---|
| Run large migrations during peak traffic | Long locks on tables | Blocks server requests | Slow or failed page loads | [X] Bad |
| Apply small, incremental migrations with zero-downtime strategy | Minimal or no locks | Non-blocking server | Smooth user experience | [OK] Good |