The database waited. Silent. Until you added a new column.
A schema change is never just a small tweak. Adding a new column alters the shape of your data. It can shift query performance, affect indexing, and impact every service that touches the table. The simplicity of ALTER TABLE hides the work happening under the hood—locking, rewriting, or re-indexing depending on the database engine.
In PostgreSQL, adding a column with a default value to a large table can lock writes until the operation finishes. MySQL behaves differently, sometimes allowing instant column adds for certain data types. SQLite rewrites the table in the background. Understanding these differences is not optional if uptime and performance matter.
When planning a new column, start with its data type. Choose the smallest type that meets your requirements. Decide if it can be nullable without introducing unexpected NULL checks throughout your code. If it requires defaults, consider handling them in application logic to avoid long transactional locks during the migration.