A new column in a database starts with definition. Declare the name, type, nullability, and default value with care. Every choice here shapes performance, storage, and query plans. TEXT in place of VARCHAR can cost throughput. NULL by default may hide missing data problems until too late.
For live systems, the key is migration with zero downtime. Online DDL tools like pt-online-schema-change and gh-ost can add a new column without locking writes. Structure migrations in steps: first deploy code that can handle both old and new schemas, then roll out the column, then switch fully to the new schema. Always index only when necessary—adding an index with the new column can multiply migration time and risk if done carelessly.
Test migrations in a staging environment with production-sized data. Monitor query performance before and after. Measure the impact on replication lag. Avoid large default values that rewrite entire tables. Use smaller, typed defaults for speed and predictability. Keep transactions short.