The numbers were off, and you knew why—there was no new column.
Adding a new column sounds simple. It isn’t. In production, one schema change can stall deployments, lock rows, and block writes. The wrong migration strategy can take down uptime or corrupt data. The right one is fast, safe, and repeatable.
Start by defining the exact purpose. A new column should solve a clear requirement—store new data, support an index, enable a feature. Decide the column name, type, default value, and constraints. Keep it atomic. Avoid a chain of unrelated changes in one migration.
In relational databases, choose the migration method based on table size, expected downtime, and locking behavior. For large datasets, avoid blocking DDL. Use tools like pt-online-schema-change for MySQL or gh-ost to add the column without locking writes. In Postgres, many ALTER TABLE ... ADD COLUMN operations are metadata-only when defaults are NULL, but adding a non-null default can rewrite the whole table. Understand your engine.