The migration froze at 62%. Logs showed the error: unknown column.
Adding a new column should be simple. In practice, it can break production, trigger downtime, or cause silent data drift. The gap between an idea and a working schema change is where most teams lose speed.
A new column alters the shape of your data. In SQL, the ALTER TABLE command can add it instantly on small datasets. On large tables, it locks writes, burns CPU, and risks service disruption. PostgreSQL, MySQL, and other relational databases have different behaviors. MySQL can block for minutes or hours unless you use ONLINE algorithms. PostgreSQL avoids blocking for certain column additions, but type changes or defaults can still lock.
Planning is critical. Use ADD COLUMN without heavy defaults when possible. Backfill data incrementally with batch updates. Create indexes after populating values. Always test migrations on a production-sized clone. Watch for ORM-generated DDL that hides unsafe operations.