The query ran. The result came back. You realized the table needed a new column.
Adding a new column should be simple. In practice, it can break production if done without care. Schema changes touch live data, running queries, triggers, and backups. The wrong approach can lock rows for minutes or even hours. Users notice. Latency spikes. Deadlines slip.
Before adding a new column, profile your table. Check row count, index size, and write frequency. Know if your database supports non-blocking ALTER TABLE operations. Some systems copy the entire table on change. Others only update metadata if defaults are null. Understand which case applies before you push.
Use migration tools that batch updates or create shadow tables. For large datasets, backfill in controlled steps. Always version your schema changes in code. Never “hotfix” database definitions outside of tracked migrations.