A migration had pushed cleanly, but the query logs lit up with errors. The culprit was simple: a missing new column that the latest feature code expected. One forgotten line in a migration script turned into an outage. This is the moment every engineer remembers to respect schema changes.
Adding a new column can be trivial or catastrophic, depending on the process. In relational databases like PostgreSQL, MySQL, or MariaDB, the ALTER TABLE ... ADD COLUMN command works fast for most cases. But on large tables, the operation can lock writes, spike CPU usage, and stall production traffic. Proper planning avoids these risks.
Best practice is to add the new column as nullable with a default of NULL. This ensures schema changes apply instantly without rewriting the existing table data. Once deployed, a backfill process populates the column in controlled batches. When complete, constraints or NOT NULL requirements can be added safely.
For high-volume systems, use online schema change tools such as pt-online-schema-change or gh-ost. These tools copy data incrementally and swap in the updated table with minimal disruption. In cloud-managed databases, some providers now support instant add-column operations through metadata-only changes.