Description
In a perfect world, all of the data underlying your web app is accurate, complete, and error-free. But in the real world, production data sometimes needs to be updated.
Perhaps you made some bad choices when setting up your models. Or maybe a bug introduced some inconsistent data. So how do you fix it? The naïve approach might be to run an update directly on your production database, but that kind of approach is extremely risky.
This talk will outline some best practices for fixing production data. We'll go beyond the obvious precautions such as testing your scripts and ensuring that you have a database backup. Instead, this talk will focus on writing scripts that are idempotent, reversible, and performant.