Adding a new column in production is simple on paper. In reality, it can break queries, crash reports, and leave silent data gaps. The right approach starts before the ALTER TABLE statement. Define the column name, data type, nullability, default value, and index strategy. Avoid changing column order; most modern databases do not guarantee order anyway.
When adding a new column, consider its impact on read and write paths. For large datasets, use online schema change tools to avoid locking tables. In MySQL, tools like pt-online-schema-change or gh-ost can keep the system responsive. In PostgreSQL, adding a nullable column without a default is usually an instant operation, but adding with a default will rewrite the table.
Application code must handle the new column gracefully. Deploy schema changes before rolling out code that depends on them. If the column is required for new features, ship in stages: