When the Deadline Made the Solution Better
We had to ship a feature in two weeks that relied on MySQL auto-increment behavior. Problem: our production database was MySQL 5, which handles auto-increment differently than MySQL 8 after a restart. The MySQL 8 migration was scheduled for two months out. We needed to ship now. The Situation We were building a resource allocation feature that tracked which resources were assigned to which entities. The code assumed MySQL 8 auto-increment behavior: when the database restarts, auto-increment picks the largest existing ID and continues from there. ...