Adding a new column in a database sounds simple. It is not. Done wrong, it locks rows, stalls queries, and drags your application into downtime. Done right, it extends your schema without breaking production traffic.
When you add a new column, start by choosing the correct data type. Match it to the real data you expect, not guesses. Avoid defaults that bloat storage or slow reads. Decide if the column must be nullable. Non-null with no default forces every existing row to get a value, which can lock your table for minutes or hours.
For relational databases like PostgreSQL, use ALTER TABLE ... ADD COLUMN with care. Large tables need online schema changes. In MySQL, tools like gh-ost or pt-online-schema-change can add a column without blocking queries. In PostgreSQL, adding a nullable column with no default is instant. But adding a default triggers a table rewrite.
Plan index changes after the column exists. Creating an index during peak traffic will hurt performance. Use concurrent index creation in PostgreSQL or online DDL in MySQL to reduce impact.