The database groaned under the weight of old structure. You knew it was time for a new column.
A new column is never just a line in a migration. It changes the shape of data. It changes queries, indexes, and the assumptions buried in code. Adding a new column to a production table means thinking about locks, defaults, nullability, and rollback paths.
In PostgreSQL, ALTER TABLE ... ADD COLUMN is simple on paper. In reality, large tables can lock writes during schema changes. MySQL shares this risk unless you use ALGORITHM=INPLACE or ALGORITHM=INSTANT, depending on version and storage engine support. With cloud-hosted databases, performance cliffs appear if the operation forces a table rewrite.
Before adding the new column, check the read and write patterns. A nullable column can be added without touching every existing row. A column with a default value often rewrites the table, which is expensive. To avoid downtime, deploy in steps: