Adding a new column can be simple. It can also destroy uptime, corrupt data, or lock your schema in ways that haunt your roadmap. Schema changes are not just syntax; they are production events with real risk.
The basics start with ALTER TABLE ... ADD COLUMN. In PostgreSQL, adding a nullable column without a default is instant. Adding one with a default rewrites the table. MySQL is similar, but specific storage engines may behave differently. In high-traffic systems, that rewrite can hammer performance and hold locks that stall queries across the app.
Before you add a column in production, check size and row count. Benchmark the migration in staging with production-like data. Use tools built for online schema changes when downtime is not acceptable. For MySQL, gh-ost and pt-online-schema-change are proven. For PostgreSQL, pgcopydb or logical replication patterns can move you forward without blocking.