The migration was done, but the schema didn’t match. You needed a new column, and you needed it now.
Adding a new column should be simple, but it’s where projects slow down. Databases lock tables. Migrations block deploys. Application code breaks on nulls or default values you didn’t expect. Teams argue over whether to run online schema changes or schedule downtime.
A new column starts with a decision: alter the table in place, or create a shadow table and backfill. In-place changes on small datasets are fine. Large datasets need care. Use tools like pt-online-schema-change or native features like PostgreSQL’s ADD COLUMN with defaults on modern versions to avoid full table rewrites.
Always define the column with clear data types. Avoid TEXT when a VARCHAR limit is known. If the column can’t be null, decide whether to set a default or populate it before enforcing constraints. Defaults make application updates easier but can hide bugs if used carelessly.