Adding a new column should be simple. In practice, it impacts schema, queries, indexes, and deployments. The wrong approach can lock tables, break integrations, and trigger downtime. The right approach is planned, safe, and repeatable.
In SQL, a new column changes the structure of a table. With ALTER TABLE, the database rewrites metadata. In small datasets, this is fast. In large tables, this can be disruptive. PostgreSQL, MySQL, and other systems have different behaviors. PostgreSQL can add a nullable column with a default instantly, if the default is constant. MySQL might lock the table depending on the storage engine. Testing these changes on staging with production-like data is essential.
When adding a new column to production, avoid retroactively populating huge datasets in a single step. Backfill in batches to prevent load spikes. Create indexes only after the data is populated to minimize write overhead. Consider adding the column in a backwards-compatible way, so both old and new versions of the service can run during the deployment.