migrations

  • Dropping an unused foreign key constraint without table locks

    Dropping foreign keys in MySQL requires care. Many developers assume dropping the constraint drops the underlying index automatically, or that the alter operation is safe on large tables.…

  • Zero-downtime column rename under 400 writes a second

    In MySQL 8, RENAME COLUMN is theoretically an instantaneous metadata-only operation with ALGORITHM=INPLACE. In practice, running it against a table handling four hundred writes a second during business…

  • An enum case removed, and the stored values that remained

    A status removed from an enum, and eleven thousand rows still holding its value. Removing an enum case is a schema change disguised as a code change, and…

  • The partition that could finally be dropped

    A partition where every remaining row was past its retention, eight months after the classification work. The partition scheme from 2023 aligns with the retention classes only at…

  • A denormalised schema that is rebuilt rather than synchronised

    A reporting schema shaped for the questions, populated by a full rebuild, which removes every synchronisation bug. Denormalisation is safe here because the table is truncated and rebuilt…

  • Deleting a module

    A module built in 2022 for a product line discontinued in 2024. Eight thousand lines, a database schema and two scheduled jobs, all still running.

  • The reporting database that is not a replica

    A read replica serving reports, and reports that want a different schema. Eleven indexes on production tables that exist only for reporting.

  • The value object library, five years on

    32 value objects in 2021, 41 now, and a retrospective on which of them earned their place. No symptom — a deliberate look.

  • Ten years of a WordPress site, and what is left of the theme

    A theme that was 61 PHP templates in 2023 and is six block templates and a stylesheet. An audit rather than a problem.

  • A dual-write window, and the check that ran nightly

    Six weeks of writing two columns, and a check that they agree. The nightly agreement check is what makes a dual-write window safe, and it caught exactly the…