Adding a new column seems simple. It isn’t. The moment you touch a live schema, you risk downtime, broken queries, and subtle bugs. The wrong approach can block writes, lock tables, or corrupt data. The right approach keeps production running while your schema evolves in place.
In SQL, the ALTER TABLE command creates a new column. For small datasets, it can be instant. For large tables in production, it can be dangerous. On high-traffic systems, schema changes must be planned with migrations that run without blocking. Tools like pt-online-schema-change or native online DDL in MySQL, PostgreSQL, and other engines can add a new column in the background while queries flow uninterrupted.
Choosing data types and defaults is critical. A new column with a default value may rewrite every row, causing massive I/O. Null defaults avoid this rewrite but require code paths to handle missing data. Constraints and indexes on the new column can also add cost. Create them separately after the column is in place to reduce lock time.