Adding a new column should be fast. It should not block your deployment pipeline. It should not lock rows for hours. The wrong approach will cause downtime, data loss, or broken queries. The right approach will make the change invisible to your users.
First, define the new column with precision. Name it for clarity. Choose the correct data type. Decide if it needs to be nullable or have a default value. Avoid arbitrary defaults that can hide bugs. Every choice at this stage affects performance, indexing, and schema evolution later.
Second, migrate safely. For small datasets, a direct ALTER TABLE works. For large tables in production, use an online schema change. Tools like pt-online-schema-change or gh-ost can add a new column without locking writes. Run the migration in staging first. Watch query plans. Monitor replication lag.
Third, update your code to use the new column. Ship the schema before writing to it. Then release the application changes. This prevents race conditions between old code and the new schema. Add tests that fail if the column is missing.