Was writing script to do data manipulation. Thought everything worked fine on the test rows that I were changing and operating on. But I never tried any manipulations on a larger dataset, so the moment it ran, it failed spectacularly on embarrassingly easy-to-fix bugs!
Lesson: look at the prod db (of course, only if you’re allowed to see the data). Actually looking at the instances will give you more familiarity and concreteness so you’re not just dealing with abstract schemas and joins, but so that you actually know wtf we’re talking about.