Adding a new column seems simple—a single line in a migration or an ALTER TABLE command. But in production, every detail matters. A new column changes schema, storage, and query performance. It impacts indexes, triggers, and replication lag. Done well, it unlocks new features. Done poorly, it breaks everything.
Start with a clear migration plan. Define the column name, data type, nullability, and default value. Align naming with existing standards. Check for downstream dependencies: ORM mappings, services, API contracts. Every new column adds to the payload of SELECT queries.
On large datasets, avoid locking the table for too long. Use online schema change tools like gh-ost or pt-online-schema-change. These allow backfills in small batches, reducing risk. For read-heavy tables, make sure indexes stay efficient after the change.