Adding a new column sounds small. In production, it’s not. You need to control schema changes, preserve uptime, and avoid breaking dependent services. SQL alters can lock large tables. Migrations must work in both directions. Defaults matter because they determine how existing rows behave. Nullability rules decide whether old data passes or fails.
In PostgreSQL, ALTER TABLE ... ADD COLUMN is straightforward. You can append a new column with a default, but on large datasets this can trigger a full table rewrite. To prevent downtime, add the column without a default, then backfill in batches, and finally set the default and NOT NULL constraints. In MySQL, adding a column can copy the table depending on storage engine and position in the schema. Test on a staging database with production-sized data.
For distributed systems, coordinate schema deployments with application deploys. Use feature flags to avoid race conditions between old code and new column references. Ensure ORM migrations are versioned and that no service queries a column before it exists across all environments.