Adding a new column sounds simple. In production, it can be dangerous. Poor planning can lock tables, slow queries, or cause deployment downtime. The right process avoids these traps.
First, define the exact requirements. Know the column name, type, default value, nullability, and how it will be used in queries. Make sure every application service that reads or writes to the table is updated to handle the new column before it is exposed in production.
Second, choose a migration strategy. For large tables, adding a new column with a default can rewrite the whole table. On some databases, this is instant if no default is set. Consider adding the column as nullable, backfilling data in batches, then setting constraints later. This approach reduces lock time and contention.