Summary

I don’t think we should be writing/running one off scripts that only reside on our development machines.

Scenario

We want to fix some data in a Demo environment. Previously this has been achieved by writing a script to fix the data and run from the developer’s machine in the Demo environment

Potential Issues

  1. Un-reviewed scripts could be buggy/non-performant
  2. These could be run on the Production environment by accident
  3. There is no record/history of the script being run

Thoughts

If the data is worth fixing in any one environment it’s worth writing a script/migration that would fix it in all/any environments - idempotent