Adding a new column to a database looks simple. It rarely is. The wrong move locks tables, stalls transactions, and puts the application into downtime. The right move is precise.
First, define the purpose of the column. Know its type, constraints, and default values. Every decision affects performance and integrity. In production, avoid ALTER TABLE without a plan—especially on large datasets. Use non-blocking migrations when supported. Break changes into steps: create the column, backfill data, then add constraints.
Test against a copy of production data. Measure execution time. Watch indexes. Adding an index too soon can slow inserts and updates. Delay until data is populated.