The database needs a new column. You don’t have days or weeks. You have minutes.
Adding a column sounds simple, but scale makes it dangerous. Schema changes can lock tables, block writes, and cripple performance. The right approach depends on three factors: the size of the dataset, the read/write traffic, and the database engine.
In PostgreSQL, ALTER TABLE ADD COLUMN is fast when the column has no default value or uses NULL. But adding a column with a default that is not NULL forces a table rewrite. That can take hours for large tables and block queries. Use ADD COLUMN with NULL first, then backfill in small batches.
MySQL behaves differently. Adding a column can trigger a full table copy, depending on the storage engine and version. With InnoDB and newer versions, instant ADD COLUMN is supported if constraints allow. Always check innodb_online_alter_log_max_size to control log growth during the operation.