Adding a new column is one of the most common schema changes in any database. It’s also one of the most dangerous if done without care. The wrong approach can lock rows, slow queries, and create downtime that users will notice. The right approach makes the change seamless, fast, and safe.
First, decide on the column type and constraints. Use the smallest data type that supports your needs. This reduces storage and speeds up scans. Define NULL vs NOT NULL early. Adding a NOT NULL column with a default can rewrite the entire table, so think through whether you can initialize values in batches.
Second, choose a migration strategy. In production, long ALTER TABLE operations can block writes. Many developers use tools like pt-online-schema-change or native database features for online DDL. These allow you to add columns without locking the table for the duration of the operation.