The database was running hot, and the feature spec dropped a single demand: add a new column.
A new column sounds small, but it cuts through your schema, your API, and your deployment process. Done wrong, it can lock tables, block writes, and trigger downtime. Done right, it slips in under load and is invisible to users. The difference is in how you plan, execute, and monitor.
First, define the exact purpose of the new column. Keep its data type precise. Avoid generic types like TEXT or VARCHAR(max) unless you have a clear reason. Use NOT NULL constraints only if you can set a default immediately. Each choice alters storage, indexing, and query performance.
Next, decide on the migration strategy. Avoid blocking DDL in production. In PostgreSQL and MySQL, adding a nullable column without a default is usually instant. Adding a non-null column with a default can rewrite the table. If the new column must have data now, process it in batches or through background jobs.