🧵 How to do blue 🔵-green 🟢 deployments with Django migrations?
Use SeparateDatabaseAndState()‼️
1. Generate migrations
2. Move all operations to the state_operations argument of SeparateDatabaseAndState() and leave database_operations empty
3. Deploy to all instances. DB structure is unchanged. Everything works with both versions of your app ✅
