Adding a new column sounds simple. In production, it is not. The wrong migration locks tables, blocks writes, and slows everything downstream. The key is precision: design it, run the DDL safely, and validate without breaking the app.
Start with your schema definition. Decide on the exact data type, length, and nullability. A VARCHAR that is too short will silently truncate. A column that allows NULL can create logic bugs. Use DEFAULT values when possible to keep insert performance consistent.
Run migrations in a controlled way. On large tables, adding a new column with a default and not null constraint can be unsafe. Most relational databases will rewrite the full table, causing downtime. In MySQL or PostgreSQL, consider adding the column without constraints first, backfilling in small batches, and then adding constraints in a separate step.