A single change can cascade through an entire system. Adding a new column in a database is never just a matter of altering one table. It touches migrations, code, tests, indexes, and possibly downstream consumers. Get it wrong, and you face broken deployments, data loss, or inconsistent states. Get it right, and the system evolves without a hitch.
When you add a new column, start with the schema. Define the exact data type, nullability, and constraints. Avoid assuming defaults. If the column should not accept null values, backfill existing rows before setting NOT NULL. For indexed columns, consider the performance cost. Large indexes can slow writes and lock tables during creation.
Write migrations that are idempotent and reversible. Split destructive or heavy operations into multiple deploys if necessary. In live systems with high traffic, use techniques like adding the nullable column first, then backfilling in batches, and finally enforcing constraints in a later migration.