The schema is solid. The API is fast. But the product owner just asked for a new column.
Adding a new column should be simple. In practice, it can break pipelines, slow queries, and expose hidden assumptions in your codebase. The difference between a clean migration and a deployment fire drill comes down to process and foresight.
First, define the new column at the database layer. Choose the correct data type from the start. Avoid nullable fields unless there is a justified reason. Set sensible defaults to prevent null-related errors in production. Document the purpose of the column in your schema migrations so future maintainers can understand it without digging through commit history.
Second, update your data access layer. This means ORM models, DTOs, API responses, and any direct SQL queries. Review every piece of code that selects, inserts, or updates rows. Make sure the new column is handled gracefully in both reads and writes.