The table waits. You need a new column. The schema is already in production, the data is live, and the deadline is near. You can’t afford downtime, broken queries, or a migration that locks the database for hours.
Adding a new column should be simple. In practice, it’s where design meets reality. You need to pick the right data type. You need to define nullability without breaking inserts. You need a default value strategy that won’t block the table. For large datasets, a careless ALTER TABLE can cause a full table rewrite, killing performance.
The first step: understand your database engine’s behavior. In PostgreSQL, adding a nullable column with no default is instant. But adding a column with a non-null default can lock writes until the update finishes. MySQL’s performance depends on the ALGORITHM and LOCK settings. SQLite rewrites the table on most schema changes.