Adding a new column should be simple. In practice, the details matter. The schema change affects queries, indexes, and downstream systems. Get it wrong, and you create a migration bottleneck. Get it right, and you extend the model without breaking production.
Start by defining the purpose of the new column. Decide its type, constraints, and default values before you touch the database. An integer to store counts, a text field for metadata, or a JSONB column for flexible structures—each comes with tradeoffs in storage, indexing, and query performance.
Run the schema change in a migration, not ad‑hoc in production. Use transactional DDL if your database supports it. For large tables, avoid blocking writes: in PostgreSQL, add the column with a default of NULL, then backfill data in batches and add constraints after. In MySQL, use tools like pt‑online‑schema‑change or gh‑ost for zero‑downtime migrations.