Adding a new column sounds simple. In production, it can be dangerous. Wrong defaults trigger downtime. Bad migrations lock tables and stall traffic. The details decide if the change ships clean or turns into an incident.
A new column in PostgreSQL or MySQL needs careful planning. First, confirm how the database handles schema changes. In PostgreSQL, adding a nullable column without a default is fast. In MySQL, the same change may lock the table depending on storage engine and version. Review the migration path on a staging replica before touching production.
Choose the data type with intent. INTEGER, TEXT, JSONB—each affects storage, indexing, and query cost. If the new column needs indexing, create the index in a separate migration to avoid long locks.
If the column must be non-null, first create it as nullable. Backfill data in batches. Then add the NOT NULL constraint once all rows are ready. This avoids full table rewrites under load.