Adding a new column is one of the simplest database operations, yet it can destroy uptime if handled wrong. Schema changes lock tables. They block writes. They block reads. A busy system can stall in seconds. For high-traffic services, an ALTER TABLE on production is dangerous unless planned down to the millisecond.
The method depends on the database engine. In PostgreSQL, adding a nullable column with no default is fast. The table metadata changes, but the rows are not rewritten. Adding a column with a NOT NULL constraint and a default requires a full table rewrite, which can lock your service. MySQL and MariaDB behave differently based on storage engine, column order, and whether you use ALGORITHM=INPLACE or ALGORITHM=INSTANT.
Zero-downtime schema migrations demand preparation. Use online schema change tools. Backfill data in batches. Monitor replication lag if you run multiple nodes. In cloud-hosted systems, test the migration on a staging environment with identical load before going live.