Adding a new column sounds simple. It isn’t. Schema changes touch production data, performance, and the logic wrapped around it. A poorly executed ALTER TABLE can block writes, lock rows, or grind queries to a halt. In high-traffic systems, even a single new column can ripple through the stack.
First, decide the type. INT, TEXT, JSONB — choose for the workload and query patterns. A wrong type here means costly casts or migrations later. If the column will store user-facing data, consider collation rules. If it drives indexes, think about write amplification and storage growth.
Second, plan the migration. Online schema change tools like gh-ost or pt-online-schema-change avoid downtime by creating a shadow table and swapping it in. For smaller datasets, a direct ALTER TABLE might suffice, but test it on a staging copy with realistic load.