The fix was obvious: add a new column. The problem was everything that came after.
Creating a new column in a production database is not just a SQL command. It’s a contract change. It can slow queries, break downstream services, trigger migrations, and force application updates. The right approach depends on scale, traffic, and tooling.
Defining the New Column
Start by choosing the correct data type. Align it with existing conventions. Use NOT NULL sparingly—especially when the table is large or indexed heavily. If default values are needed, set them with care; an unbounded default write can lock the table for longer than planned.
Migrating Without Downtime
For high-traffic systems, adding a column can be staged. Tools like pt-online-schema-change or native transactional DDL in newer databases help. Break the change into steps: