The migration script was running fine until it hit the table that refused to change. You needed a new column. Simple, except it never is.
Adding a new column sounds trivial but it touches every layer. Schema, code, queries, tests, monitoring—each one must agree on its existence. Get it wrong and you break production. Get it right and everything stays invisible, as it should.
First, define the new column in your database migration. Use the correct data type from the start to avoid costly rewrites. Make it nullable if rolling out incrementally, non-nullable once populated. Create defaults carefully—implicit values can mask bugs for months.
Next, update your ORM models or query builders. A schema change without matching application code will throw runtime errors or silently omit data. Make sure serialization and API contracts reflect the new field. Remember that some unexpected consumers might depend on your existing shape.