A database lives or dies by its schema. Adding a new column is one of the simplest changes you can make—and one of the riskiest if done without care. The wrong migration can lock tables, slow queries, or bring an application to a halt. The right migration is invisible to users and painless for the team.
When you add a new column in SQL, you’re altering the table structure in place. In production, that can create contention. Large tables magnify the risk, so before writing the ALTER TABLE statement, confirm the table size, storage engine, and concurrency patterns. Always test schema changes in a staging environment with real data.
For PostgreSQL, adding a nullable column without a default is usually fast because it updates only the metadata. Adding a column with a default value rewrites the table and can block access. In MySQL, behavior depends on the version and storage engine; newer versions can add certain column types instantly, but changes that involve table rewrites still block writes.