Adding a new column sounds simple. In production systems, it rarely is. Tables hold millions of rows. Queries depend on fixed structures. Indexes, constraints, and application code all assume the old shape. Change it wrong, and the system slows, breaks, or locks hard.
The safest way to add a new column is to plan schema changes like deployments. First, check dependencies. Search the codebase for the table name. Identify every query and every migration touch point. Document these before the first SQL runs.
Use a migration tool that supports online schema changes. For MySQL, consider pt-online-schema-change or native ALTER TABLE ... ALGORITHM=INPLACE. For PostgreSQL, adding a nullable column without a default is fast, but adding a default to existing rows rewrites the table. Break large operations into steps to avoid downtime.
If the new column will be indexed, create it without the index first. Populate data in small batches. Only then add the index. This keeps locks short and avoids heavy blocking.