The database was live, traffic was high, and the product team wanted a new column by end of day.
Adding a new column should be simple. In practice, it can be a point of failure. Schema changes in production databases risk locking tables, slowing queries, or breaking code that assumes a fixed structure. Whether you use PostgreSQL, MySQL, or a cloud-managed database, the approach matters.
First, define the column with precision. Choose the correct data type to avoid costly migrations later. Decide if it should allow NULL, have a default value, or require constraints. Plan for indexing only if queries will filter or join on this field, since unnecessary indexes slow writes.
Second, coordinate schema changes with application code. Ship backward-compatible updates. In many cases, deploy the new column before the code that writes to it. This allows rolling back without downtime. Use feature flags to control usage in production.