The query ran. The table stared back, unchanged. You needed a new column.
Adding a new column is one of the most common schema changes in any production database, yet it can be one of the most dangerous. The operation touches storage, indexing, queries, and code paths all at once. If done wrong, it can block writes, burn CPU, or trigger downtime.
The first step is understanding the impact. In small tables, ALTER TABLE ADD COLUMN is fast. In large ones, the database engine might need to rewrite the entire table, locking it until complete. This matters for migrations running in live systems with billions of rows.
In PostgreSQL, adding a nullable column with a default value can be worse than adding without one. Use ADD COLUMN name TYPE first, then UPDATE in batches to avoid locks. In MySQL, ALGORITHM=INPLACE helps, but some column types force a table copy. In MongoDB, adding a new field is instant in document storage, but indexes must be updated if the column is part of a query plan.