The database table was running hot, and the metrics told you it needed room to grow. You need a new column. Fast.
Adding a new column sounds simple. It almost never is. The change ripples through queries, indexes, application code, and APIs. If you get it wrong in production, locks will block writes, queries will spike in latency, and someone will page you at 3 a.m.
A new column starts at the DDL. In PostgreSQL, ALTER TABLE ADD COLUMN is the common path. Use DEFAULT carefully—on large tables, it can trigger a full rewrite. In MySQL, adding a column in InnoDB might lock the table depending on the server version and options. With modern versions, ALGORITHM=INPLACE can make it safer, but not always instant. Always check the execution plan for your schema migration tool before you run it.
Think through nullability. A nullable new column is the fastest to add, but it pushes default-handling into the application layer. A non-null column with a default can be slower to add, but ensures data integrity on day one. These trade-offs decide whether your migration is milliseconds or hours.