Adding a new column should be simple. In practice, it can cascade through an entire system. A new column changes the shape of the data. It changes queries, indexes, migrations, and sometimes even the way services talk to each other.
First, define exactly what the new column will store. Choose a clear, precise name. Avoid generic labels. Consider the data type and constraints before touching the schema. Decisions here lock in long-term costs.
Next, create the migration. In PostgreSQL, this may mean using ALTER TABLE ADD COLUMN with defaults or nullability. In MySQL, the syntax shifts slightly, but the principle is the same. For large tables, add the new column without defaults first to avoid full table rewrites, then backfill in controlled batches.
Update every part of the stack that queries the table. Search for SELECT * and replace it with explicit projections. Modify ORM models, DTOs, and serialization code to recognize the new column without breaking existing consumers. Test reads, writes, and edge cases. Run load tests if the new column affects indexing or joins.