Adding a new column is simple in theory, but in production it can be a fault line. One wrong move and you lock a table, drop queries, or corrupt data. The right approach depends on size, uptime needs, and database engine.
In PostgreSQL, ALTER TABLE ADD COLUMN is instant for most cases. It only takes longer if you set a NOT NULL with a default, because that rewrites the table. In MySQL, adding a column may rebuild the table, causing downtime unless you use online DDL or tools like pt-online-schema-change. For large datasets, online schema changes are not optional — they are required to keep systems responsive.
Design matters before you add a new column. Define the data type with precision. Avoid generic types that waste space or slow indexing. Decide if the column will be nullable. Set defaults that match actual application logic, not just convenience.
Migrations should be reversible. Write scripts that can add and remove the new column cleanly. Test them on a staging environment with a production-like dataset. Time the migration. Measure performance impact before and after.