The migration script failed at line 43. A new column had to be added, but the database rejected it.
New column creation should be simple. It rarely is. Schema changes touch live data, and live data fights back. Adding a column isn’t just about writing ALTER TABLE. It’s about planning types, defaults, indexes, constraints, replication, and rollback paths. Mistakes here break production and burn nights.
Before adding a new column, know the exact type and constraints. A nullable text field behaves differently than a non-nullable integer with a default. The wrong default can cause locks. The wrong index can crush write performance.
In high-traffic systems, blocking writes for a schema change is not an option. Use migrations that run online, chunk data backfills, and track progress. In Postgres, ALTER TABLE ADD COLUMN is fast for new nullable columns without defaults, but slow and locking if you fill it with a default during creation. MySQL has similar pitfalls, especially before version 8.0.